Add test for checking CACHE_MISS when cache is empty 83/28983/6
authorLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Fri, 17 Oct 2014 16:45:33 +0000 (18:45 +0200)
committerLukasz Wojciechowski <l.wojciechow@partner.samsung.com>
Thu, 30 Oct 2014 12:29:41 +0000 (13:29 +0100)
Change-Id: I5857cec7b8d8da2b281a60029648d70516a3c00f

tests/cynara-tests/test_cases_async.cpp

index 74b045c52c85e4d075c00e5db3eb1676c09e895d..066dcc1985eedffba72516a484f0e193fc67ce50 100644 (file)
 
 #include <dpl/test/test_runner.h>
 
+#include <cynara-client-async.h>
+
 void tca01_initialize_func()
 {
     CynaraTestClientAsync::Client client;
 }
 
+void tca02_empty_cache_miss_func()
+{
+    std::string testNo("02");
+    CynaraTestClientAsync::Client client;
+
+    client.checkCache({testNo}, CYNARA_API_CACHE_MISS);
+    client.checkCache({testNo}, CYNARA_API_CACHE_MISS);
+}
+
 RUNNER_TEST_GROUP_INIT(cynara_async_tests)
 
 RUN_CYNARA_TEST(tca01_initialize)
+RUN_CYNARA_TEST(tca02_empty_cache_miss)