From 31f979c9690f696c0bc241bb59ad772c8001477f Mon Sep 17 00:00:00 2001 From: Andriy Gudz Date: Tue, 17 Oct 2017 15:05:37 +0300 Subject: [PATCH] Fixed test classes names --- device_core/utest/test_IoT.cpp | 6 +++--- device_core/utest/test_application_service.cpp | 4 ++-- device_core/utest/test_controlresource.cpp | 2 +- device_core/utest/test_iot_common_enforce.cpp | 2 +- device_core/utest/test_iot_tvext_policy_enforce.cpp | 2 +- device_core/utest/test_iotdevice_impl.cpp | 2 +- device_core/utest/test_nmlibapi.cpp | 18 +++++++++--------- device_core/utest/test_proxythread.cpp | 4 ++-- device_core/utest/test_registrationmq.cpp | 8 ++++---- device_core/utest/test_rmi.cpp | 2 +- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/device_core/utest/test_IoT.cpp b/device_core/utest/test_IoT.cpp index ba65430..7a912a5 100644 --- a/device_core/utest/test_IoT.cpp +++ b/device_core/utest/test_IoT.cpp @@ -97,7 +97,7 @@ TEST_F(Test_IoT_Fixture, signInCorrect) /** * Test check incorrect work of IoTivity::signIn() for empty arguments */ -TEST(test_IoT, signInIncorrectInput) +TEST(Test_IoT, signInIncorrectInput) { std::string login("login"); std::string password("password"); @@ -115,7 +115,7 @@ TEST(test_IoT, signInIncorrectInput) * 1. Device id should be not empty * 2. No exceptions should be thrown */ -TEST(test_IoT, getDeviceIdCorrect) +TEST(Test_IoT, getDeviceIdCorrect) { IoTivity* iotivity = IoTivity::getInstance(); string duid; @@ -126,7 +126,7 @@ TEST(test_IoT, getDeviceIdCorrect) /** * Test correct report format */ -TEST(test_IoT, test_IOT_ReportFormat) +TEST(Test_IoT, test_IOT_ReportFormat) { ASSERT_FALSE(NMD::makeReport("1", "sim", 0, "report data").empty()); } diff --git a/device_core/utest/test_application_service.cpp b/device_core/utest/test_application_service.cpp index 3e15b94..8e9b919 100644 --- a/device_core/utest/test_application_service.cpp +++ b/device_core/utest/test_application_service.cpp @@ -15,7 +15,7 @@ const int DPM_RET_VALUE = 55; } -TEST(test_ApplicationService, test_install) +TEST(Test_ApplicationService, test_install) { DPMMock dpm; @@ -31,7 +31,7 @@ TEST(test_ApplicationService, test_install) EXPECT_EQ(DPM_RET_VALUE, NMD::ApplicationService::install(PACKAGE_NAME)); } -TEST(test_ApplicationService, test_get_process_id_by_name) +TEST(Test_ApplicationService, test_get_process_id_by_name) { EXPECT_GE(NMD::ApplicationService::get_process_id_by_name(KNOWN_PROCESS_NAME), 0); EXPECT_EQ(-1, NMD::ApplicationService::get_process_id_by_name(UNKNOWN_PROCESS_NAME)); diff --git a/device_core/utest/test_controlresource.cpp b/device_core/utest/test_controlresource.cpp index a13ae16..c8f643e 100644 --- a/device_core/utest/test_controlresource.cpp +++ b/device_core/utest/test_controlresource.cpp @@ -29,7 +29,7 @@ public: * 2. test getHandle returns non null value * 3. test postHandler calls internal CommandHandler methods */ -TEST(test_ControlResource, test_all) +TEST(Test_ControlResource, test_all) { try { OCRepresentation rep, response; diff --git a/device_core/utest/test_iot_common_enforce.cpp b/device_core/utest/test_iot_common_enforce.cpp index 4fa1398..3ebec5a 100644 --- a/device_core/utest/test_iot_common_enforce.cpp +++ b/device_core/utest/test_iot_common_enforce.cpp @@ -13,7 +13,7 @@ const std::string policy = R"-([{"name":"sound","state":1,"items":[]}, {"name":"iptables","state":1,"items":["127.0.0.0/24|UDP|10-1024","1.1.1.1|TCP|80,443","8.8.8.8"]}])-"; } -TEST(test_CommonPolicyEnforce, test_ParseGroup) +TEST(Test_CommonPolicyEnforce, test_ParseGroup) { DPMMock dpm; diff --git a/device_core/utest/test_iot_tvext_policy_enforce.cpp b/device_core/utest/test_iot_tvext_policy_enforce.cpp index 40cd8ed..fd7053d 100644 --- a/device_core/utest/test_iot_tvext_policy_enforce.cpp +++ b/device_core/utest/test_iot_tvext_policy_enforce.cpp @@ -16,7 +16,7 @@ const std::string policy = R"-([{"name":"sound","state":1,"items":[]}, {"name":"iptables","state":1,"items":["127.0.0.0/24|UDP|10-1024","1.1.1.1|TCP|80,443","8.8.8.8"]}])-"; } -TEST(test_TvExtPolicyEnforce, test_ParseGroup) +TEST(Test_TvExtPolicyEnforce, test_ParseGroup) { DPMMock dpm; diff --git a/device_core/utest/test_iotdevice_impl.cpp b/device_core/utest/test_iotdevice_impl.cpp index a7fd158..c2db92d 100644 --- a/device_core/utest/test_iotdevice_impl.cpp +++ b/device_core/utest/test_iotdevice_impl.cpp @@ -37,7 +37,7 @@ public: * 4. Post "unown" request * 4. Check ControlResource entityHandler called and posted state is "unown" */ -TEST(test_IoTDevice_Impl, test_all) +TEST(Test_IoTDevice_Impl, test_all) { try { IoTivity* iot = IoTivity::getInstance(); diff --git a/device_core/utest/test_nmlibapi.cpp b/device_core/utest/test_nmlibapi.cpp index bb39d6a..9bc8fc2 100644 --- a/device_core/utest/test_nmlibapi.cpp +++ b/device_core/utest/test_nmlibapi.cpp @@ -40,7 +40,7 @@ extern std::string TEST_ACCOUNT_PASSWORD; /** * Performs init, signin, sign out and cleanup */ -TEST(test_nmlibapi, signInCorrect) +TEST(Test_nmlibapi, signInCorrect) { std::string login(TEST_ACCOUNT_LOGIN); std::string password(TEST_ACCOUNT_PASSWORD); @@ -59,7 +59,7 @@ TEST(test_nmlibapi, signInCorrect) /** * Test checks correct work of nmlib functions with nullptrs as arguments */ -TEST(test_nmlibapi, nullptrArgs) +TEST(Test_nmlibapi, nullptrArgs) { const char DEV_ID[] = "dev-id"; NM_Context ctx{nullptr, nullptr}; @@ -104,7 +104,7 @@ TEST(test_nmlibapi, nullptrArgs) ASSERT_NO_THROW(NM_freeCharBuffer(nullptr)); } -TEST(test_nmlibapi, NM_deleteApp) +TEST(Test_nmlibapi, NM_deleteApp) { const char DEV_ID[] = "device-id"; const char PARENT_UID[] = "parent-id"; @@ -156,7 +156,7 @@ TEST(test_nmlibapi, NM_deleteApp) EXPECT_EQ(EC_INTERNAL_ERROR, NM_deleteApp(&ctx, DEV_ID, EMPTY_PARENT_UID, APP_NAME)); } -TEST(test_nmlibapi, NM_cleanup) +TEST(Test_nmlibapi, NM_cleanup) { NM_hContext ctx = nullptr; EXPECT_NO_THROW(NM_cleanup(&ctx)); @@ -166,7 +166,7 @@ TEST(test_nmlibapi, NM_cleanup) } -TEST(test_nmlibapi, NM_signOut) +TEST(Test_nmlibapi, NM_signOut) { IoTivityMock iot; NM_Context ctx; @@ -185,13 +185,13 @@ void test_NM_deviceStateChangedCb(const char*, DeviceState, void*) { } -TEST(test_nmlibapi, NM_subscribeDeviceStateChanged) +TEST(Test_nmlibapi, NM_subscribeDeviceStateChanged) { NM_Context ctx = {nullptr, nullptr}; EXPECT_EQ(EC_OK, NM_subscribeDeviceStateChanged(&ctx, test_NM_deviceStateChangedCb, nullptr)); } -TEST(test_nmlibapi, NM_deviceListEnum) +TEST(Test_nmlibapi, NM_deviceListEnum) { IoTDeviceMock dev; const std::string uuid_dev = "11111111-1111-1111-1111-111111111111"; @@ -241,7 +241,7 @@ void test_NM_deviceEnumerationCb(NM_hDeviceList dev_list, const char* id, void* * 2. Call NM_deviceListForEach * 3. Check expectations */ -TEST(test_nmlibapi, NM_deviceListForEach) +TEST(Test_nmlibapi, NM_deviceListForEach) { IoTDeviceMock dev; const std::string uuid_dev = "11111111-1111-1111-1111-111111111111"; @@ -259,7 +259,7 @@ TEST(test_nmlibapi, NM_deviceListForEach) /** * @brief TEST for NM_getDeviceInfo function */ -TEST(test_nmlibapi, NM_getDeviceInfo) +TEST(Test_nmlibapi, NM_getDeviceInfo) { const std::string DEV_UUID = "11111111-1111-1111-1111-111111111111"; const std::string DEV_UUID_UNKNOWN = "unknown"; diff --git a/device_core/utest/test_proxythread.cpp b/device_core/utest/test_proxythread.cpp index dee92aa..6b61646 100644 --- a/device_core/utest/test_proxythread.cpp +++ b/device_core/utest/test_proxythread.cpp @@ -7,7 +7,7 @@ using namespace std; -TEST(test_proxythread, test_ProxyThread) +TEST(Test_proxythread, test_ProxyThread) { try { ProxyThread proxy; @@ -28,7 +28,7 @@ TEST(test_proxythread, test_ProxyThread) } } -TEST(test_proxythread, test_exceptions) +TEST(Test_proxythread, test_exceptions) { try { ProxyThread proxy; diff --git a/device_core/utest/test_registrationmq.cpp b/device_core/utest/test_registrationmq.cpp index 92d4c1d..7c4ab01 100644 --- a/device_core/utest/test_registrationmq.cpp +++ b/device_core/utest/test_registrationmq.cpp @@ -41,7 +41,7 @@ public: * 1. Test registration of parent/standalone device * 2. Test registration of child device */ -TEST(test_RegistrationMQ, test_reg) +TEST(Test_RegistrationMQ, test_reg) { OC::OCRepresentation representation1; representation1.setValue("duid", DUID); @@ -72,7 +72,7 @@ TEST(test_RegistrationMQ, test_reg) /** * @brief TEST for RegistrationMQ::unreg method */ -TEST(test_RegistrationMQ, test_unreg) +TEST(Test_RegistrationMQ, test_unreg) { OC::OCRepresentation representation; representation.setValue("duid", DUID); @@ -87,7 +87,7 @@ TEST(test_RegistrationMQ, test_unreg) /** * @brief TEST for RegistrationMQ::del method */ -TEST(test_RegistrationMQ, test_del) +TEST(Test_RegistrationMQ, test_del) { OC::OCRepresentation representation; representation.setValue("duid", DUID); @@ -99,7 +99,7 @@ TEST(test_RegistrationMQ, test_del) ASSERT_NO_THROW(RegistrationMQ::del(&mqclient, DUID)); } -TEST(test_RegistrationMQ, test_null_args) +TEST(Test_RegistrationMQ, test_null_args) { ASSERT_ANY_THROW(RegistrationMQ::reg(nullptr, DUID, UUID, NAME, MODEL, TYPE, PARENT)); ASSERT_ANY_THROW(RegistrationMQ::unreg(nullptr, DUID)); diff --git a/device_core/utest/test_rmi.cpp b/device_core/utest/test_rmi.cpp index da9d3a8..feb31a5 100644 --- a/device_core/utest/test_rmi.cpp +++ b/device_core/utest/test_rmi.cpp @@ -129,7 +129,7 @@ TEST(DISABLED_test_rmi, handshakeCorrect) * 5. Disconnect client * 6. Kill service process */ -TEST(test_rmi, agentPolicyAdapterCorrect) +TEST(Test_rmi, agentPolicyAdapterCorrect) { pid_t pid = fork(); -- 2.7.4