Adjust cynara wrapper to framework
[platform/core/test/security-tests.git] / src / cynara-tests / test_cases_async.cpp
index 1412fcd..2f8eb48 100644 (file)
 using namespace CynaraTestClientAsync;
 using namespace CynaraTestAdmin;
 
-void tca01_initialize_func()
+RUNNER_TEST_GROUP_INIT(cynara_async_tests)
+
+RUN_CYNARA_TEST(tca01_initialize)
 {
     Client client;
 }
 
-void tca02_empty_cache_miss_func()
+RUN_CYNARA_TEST(tca02_empty_cache_miss)
 {
     std::string testNo("02");
     Client client;
@@ -50,7 +52,7 @@ void tca02_empty_cache_miss_func()
     client.checkCache({testNo}, CYNARA_API_CACHE_MISS);
 }
 
-void tca03_create_max_requests_func()
+RUN_CYNARA_TEST(tca03_create_max_requests)
 {
     std::string testNo("03");
     cynara_check_id id;
@@ -67,7 +69,7 @@ void tca03_create_max_requests_func()
     client.assertStatus(READWRITE);
 }
 
-void tca04_request_and_process_func()
+RUN_CYNARA_TEST(tca04_request_and_process)
 {
     std::string testNo("04");
     cynara_check_id id;
@@ -88,7 +90,7 @@ void tca04_request_and_process_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca05_request_and_cancel1_func()
+RUN_CYNARA_TEST(tca05_request_and_cancel1)
 {
     std::string testNo("05");
     int subtest = 1;
@@ -113,7 +115,7 @@ void tca05_request_and_cancel1_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca05_request_and_cancel2_func()
+RUN_CYNARA_TEST(tca05_request_and_cancel2)
 {
     std::string testNo("05");
     int subtest = 2;
@@ -137,7 +139,7 @@ void tca05_request_and_cancel2_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca05_request_and_cancel3_func()
+RUN_CYNARA_TEST(tca05_request_and_cancel3)
 {
     std::string testNo("05");
     int subtest = 3;
@@ -162,7 +164,7 @@ void tca05_request_and_cancel3_func()
     client.cancel(id, CYNARA_API_INVALID_PARAM);
 }
 
-void tca06_cancel_fail_func()
+RUN_CYNARA_TEST(tca06_cancel_fail)
 {
     cynara_check_id id = 0xDEAD;
 
@@ -171,7 +173,7 @@ void tca06_cancel_fail_func()
     client.cancel(id, CYNARA_API_INVALID_PARAM);
 }
 
-void tca07_request_with_data_insertion_func()
+RUN_CYNARA_TEST(tca07_request_with_data_insertion)
 {
     std::string testNo("07");
     Admin admin;
@@ -220,7 +222,7 @@ void tca07_request_with_data_insertion_func()
     client.checkCache(data[1], CYNARA_API_CACHE_MISS);
 }
 
-void tca08_disconnect1_func()
+RUN_CYNARA_TEST(tca08_disconnect1)
 {
     std::string testNo("08");
     int subtest = 1;
@@ -240,7 +242,7 @@ void tca08_disconnect1_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca08_disconnect2_func()
+RUN_CYNARA_TEST(tca08_disconnect2)
 {
     std::string testNo("08");
     int subtest = 2;
@@ -264,7 +266,7 @@ void tca08_disconnect2_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca08_disconnect3_func()
+RUN_CYNARA_TEST(tca08_disconnect3)
 {
     std::string testNo("08");
     int subtest = 2;
@@ -284,7 +286,7 @@ void tca08_disconnect3_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca09_disconnect_and_cancel1_func()
+RUN_CYNARA_TEST(tca09_disconnect_and_cancel1)
 {
     std::string testNo("09");
     int subtest = 1;
@@ -316,7 +318,7 @@ void tca09_disconnect_and_cancel1_func()
     client.assertStatus(READ);
 }
 
-void tca09_disconnect_and_cancel2_func()
+RUN_CYNARA_TEST(tca09_disconnect_and_cancel2)
 {
     std::string testNo("09");
     int subtest = 2;
@@ -348,7 +350,7 @@ void tca09_disconnect_and_cancel2_func()
     client.assertStatus(READ);
 }
 
-void tca10_double_request_func()
+RUN_CYNARA_TEST(tca10_double_request)
 {
     std::string testNo("10");
     cynara_check_id id, id2;
@@ -372,7 +374,7 @@ void tca10_double_request_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca11_double_request_with_restart_func()
+RUN_CYNARA_TEST(tca11_double_request_with_restart)
 {
     std::string testNo("11");
     cynara_check_id id, id2;
@@ -399,7 +401,7 @@ void tca11_double_request_with_restart_func()
     client.process(CYNARA_API_SUCCESS, Client::IGNORE_TIMEOUT);
 }
 
-void tca12_multiple_connections_without_requests_func()
+RUN_CYNARA_TEST(tca12_multiple_connections_without_requests)
 {
     std::string testNo("12");
 
@@ -435,23 +437,3 @@ void tca12_multiple_connections_without_requests_func()
                              << after << " / " << afterTimestamp.tv_sec << "."
                              << afterTimestamp.tv_usec);
 }
-
-RUNNER_TEST_GROUP_INIT(cynara_async_tests)
-
-RUN_CYNARA_TEST(tca01_initialize)
-RUN_CYNARA_TEST(tca02_empty_cache_miss)
-RUN_CYNARA_TEST(tca03_create_max_requests)
-RUN_CYNARA_TEST(tca04_request_and_process)
-RUN_CYNARA_TEST(tca05_request_and_cancel1)
-RUN_CYNARA_TEST(tca05_request_and_cancel2)
-RUN_CYNARA_TEST(tca05_request_and_cancel3)
-RUN_CYNARA_TEST(tca06_cancel_fail)
-RUN_CYNARA_TEST(tca07_request_with_data_insertion)
-RUN_CYNARA_TEST(tca08_disconnect1)
-RUN_CYNARA_TEST(tca08_disconnect2)
-RUN_CYNARA_TEST(tca08_disconnect3)
-RUN_CYNARA_TEST(tca09_disconnect_and_cancel1)
-RUN_CYNARA_TEST(tca09_disconnect_and_cancel2)
-RUN_CYNARA_TEST(tca10_double_request)
-RUN_CYNARA_TEST(tca11_double_request_with_restart)
-RUN_CYNARA_TEST(tca12_multiple_connections_without_requests)