summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYevhenii Dementieiev (GitHub) <ydementieiev@luxoft.com>2020-03-30 20:18:47 +0300
committerYevhenii Dementieiev (GitHub) <ydementieiev@luxoft.com>2020-03-30 20:18:47 +0300
commit5d1e1c86c015bb592f9cd47f37c4f780459bcc9d (patch)
tree15774e58e742e8ad9303eec3d0c3c85fa55da512
parent06763373047e2c89482f757571f7710655f28a66 (diff)
downloadsdl_core-impl/persist_hmi_capabilities_unit_tests.tar.gz
fixup! Increase unit tests coverage on persistence HMI capabilitiesimpl/persist_hmi_capabilities_unit_tests
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc38
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc46
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc45
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc48
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc48
-rw-r--r--src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc45
-rw-r--r--src/components/application_manager/test/hmi_capabilities_test.cc38
11 files changed, 264 insertions, 226 deletions
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc
index f99976c28a..180e5f3b8f 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/button_get_capabilities_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/button_get_capabilities_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/button_get_capabilities_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class ButtonGetCapabilitiesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(ButtonGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<ButtonGetCapabilitiesRequest>(command_msg));
@@ -77,18 +85,15 @@ TEST_F(ButtonGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
TEST_F(ButtonGetCapabilitiesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveButtonsGetCapabilities) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ onTimeOut_ButtonsGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<ButtonGetCapabilitiesRequest>(command_msg));
@@ -100,10 +105,10 @@ TEST_F(ButtonGetCapabilitiesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace button_get_capabilities_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc
index ff5457c4e9..9ba852c418 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_capabilities_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/tts_get_capabilities_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/tts_get_capabilities_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class TTSGetCapabilitiesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(TTSGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<TTSGetCapabilitiesRequest>(command_msg));
@@ -77,18 +85,14 @@ TEST_F(TTSGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
-TEST_F(TTSGetCapabilitiesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveTTSGetCapabilities) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(TTSGetCapabilitiesRequestTest, onTimeOut_TTSGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<TTSGetCapabilitiesRequest>(command_msg));
@@ -100,10 +104,10 @@ TEST_F(TTSGetCapabilitiesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace tts_get_capabilities_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc
index 5016fa4f5f..4c8b98ad1d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_language_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/tts_get_language_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/tts_get_language_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class TTSGetLanguageRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(TTSGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<TTSGetLanguageRequest>(command_msg));
EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
@@ -82,12 +90,8 @@ TEST_F(TTSGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
CommandImpl::protocol_version_);
}
-TEST_F(TTSGetLanguageRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveTTSGetLanguage) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(TTSGetLanguageRequestTest, onTimeOut_TTSGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<TTSGetLanguageRequest>(command_msg));
EXPECT_CALL(mock_hmi_capabilities_,
@@ -97,10 +101,10 @@ TEST_F(TTSGetLanguageRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace tts_get_language_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc
index 5ae3c8045e..3ec3bd444d 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/tts_get_supported_languages_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/tts_get_supported_languages_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/tts_get_supported_languages_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class TTSGetSupportedLanguagesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(TTSGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<TTSGetSupportedLanguagesRequest>(command_msg));
@@ -77,18 +85,15 @@ TEST_F(TTSGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
TEST_F(TTSGetSupportedLanguagesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveTTSGetSupportedLanguages) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ onTimeOut_TTSGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<TTSGetSupportedLanguagesRequest>(command_msg));
@@ -100,10 +105,10 @@ TEST_F(TTSGetSupportedLanguagesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace tts_get_supported_languages_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc
index 224812a8e7..3a661811cc 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_capabilities_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/ui_get_capabilities_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/ui_get_capabilities_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class UIGetCapabilitiesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(UIGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<UIGetCapabilitiesRequest>(command_msg));
EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
@@ -76,18 +84,14 @@ TEST_F(UIGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
-TEST_F(UIGetCapabilitiesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveUIGetCapabilities) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(UIGetCapabilitiesRequestTest, onTimeOut_UIGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<UIGetCapabilitiesRequest>(command_msg));
EXPECT_CALL(
@@ -98,10 +102,10 @@ TEST_F(UIGetCapabilitiesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace ui_get_capabilities_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc
index f438bfb9a3..2d8f49c2b4 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_language_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/ui_get_language_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/ui_get_language_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class UIGetLanguageRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(UIGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<UIGetLanguageRequest>(command_msg));
EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
@@ -76,18 +84,14 @@ TEST_F(UIGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
-TEST_F(UIGetLanguageRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveUIGetLanguage) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(UIGetLanguageRequestTest, onTimeOut_UIGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<UIGetLanguageRequest>(command_msg));
EXPECT_CALL(mock_hmi_capabilities_,
@@ -97,10 +101,10 @@ TEST_F(UIGetLanguageRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace ui_get_language_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc
index e66b010d3a..bbb11cec37 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/ui_get_supported_languages_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/ui_get_supported_languages_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/ui_get_supported_languages_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class UIGetSupportedLanguagesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(UIGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<UIGetSupportedLanguagesRequest>(command_msg));
@@ -77,18 +85,15 @@ TEST_F(UIGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
TEST_F(UIGetSupportedLanguagesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveUIGetSupportedLanguages) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ onTimeOut_UIGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<UIGetSupportedLanguagesRequest>(command_msg));
@@ -100,10 +105,10 @@ TEST_F(UIGetSupportedLanguagesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace ui_get_supported_languages_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc
index 36a52e8e31..2bb4291ea7 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_capabilities_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/vr_get_capabilities_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/vr_get_capabilities_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,32 +65,33 @@ const std::string kStrNumber = "123";
} // namespace
class VRGetCapabilitiesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(VRGetCapabilitiesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<VRGetCapabilitiesRequest>(command_msg));
+
EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
ASSERT_TRUE(command->Init());
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
-TEST_F(VRGetCapabilitiesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveVRGetCapabilities) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(VRGetCapabilitiesRequestTest, onTimeOut_VRGetCapabilitiesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<VRGetCapabilitiesRequest>(command_msg));
EXPECT_CALL(
@@ -98,10 +102,10 @@ TEST_F(VRGetCapabilitiesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace vr_get_capabilities_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc
index 52aa935a9b..ecf17c9359 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_language_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/vr_get_language_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/vr_get_language_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,32 +65,33 @@ const std::string kStrNumber = "123";
} // namespace
class VRGetLanguageRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(VRGetLanguageRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
-
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<VRGetLanguageRequest>(command_msg));
+
EXPECT_CALL(mock_rpc_service_, SendMessageToHMI(command_msg));
ASSERT_TRUE(command->Init());
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
-TEST_F(VRGetLanguageRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveVRGetLanguage) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+TEST_F(VRGetLanguageRequestTest, onTimeOut_VRGetLanguageUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(CreateCommand<VRGetLanguageRequest>(command_msg));
EXPECT_CALL(mock_hmi_capabilities_,
@@ -97,10 +101,10 @@ TEST_F(VRGetLanguageRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace vr_get_language_request
diff --git a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc
index d2be9b6556..ae21a5b624 100644
--- a/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/sdl_rpc_plugin/test/commands/hmi/vr_get_supported_languages_request_test.cc
@@ -30,14 +30,17 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "hmi/vr_get_supported_languages_request.h"
+
+#include <memory>
#include <string>
+#include "gtest/gtest.h"
+
#include "application_manager/commands/command_request_test.h"
#include "application_manager/commands/commands_test.h"
#include "application_manager/commands/request_to_hmi.h"
#include "application_manager/smart_object_keys.h"
-#include "gtest/gtest.h"
-#include "hmi/vr_get_supported_languages_request.h"
#include "smart_objects/smart_object.h"
namespace test {
@@ -62,13 +65,18 @@ const std::string kStrNumber = "123";
} // namespace
class VRGetSupportedLanguagesRequestTest
- : public CommandsTest<CommandsTestMocks::kIsNice> {};
+ : public CommandsTest<CommandsTestMocks::kIsNice> {
+ public:
+ MessageSharedPtr CreateCommandMsg() {
+ MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
+ (*command_msg)[strings::msg_params][strings::number] = kStrNumber;
+ (*command_msg)[strings::params][strings::connection_key] = kConnectionKey;
+ return command_msg;
+ }
+};
TEST_F(VRGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<VRGetSupportedLanguagesRequest>(command_msg));
@@ -77,18 +85,15 @@ TEST_F(VRGetSupportedLanguagesRequestTest, RUN_SendRequest_SUCCESS) {
command->Run();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
TEST_F(VRGetSupportedLanguagesRequestTest,
- onTimeOut_OnCapabilityInitialized_RemoveVRGetSupportedLanguages) {
- MessageSharedPtr command_msg(CreateMessage(smart_objects::SmartType_Map));
- (*command_msg)[am::strings::msg_params][am::strings::number] = kStrNumber;
- (*command_msg)[am::strings::params][am::strings::connection_key] =
- kConnectionKey;
+ onTimeOut_VRGetSupportedLanguagesUpdated) {
+ MessageSharedPtr command_msg = CreateCommandMsg();
RequestToHMIPtr command(
CreateCommand<VRGetSupportedLanguagesRequest>(command_msg));
@@ -100,10 +105,10 @@ TEST_F(VRGetSupportedLanguagesRequestTest,
command->Run();
command->onTimeOut();
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_type].asInt(),
- CommandImpl::hmi_protocol_type_);
- EXPECT_EQ((*command_msg)[strings::params][strings::protocol_version].asInt(),
- CommandImpl::protocol_version_);
+ EXPECT_EQ(CommandImpl::hmi_protocol_type_,
+ (*command_msg)[strings::params][strings::protocol_type].asInt());
+ EXPECT_EQ(CommandImpl::protocol_version_,
+ (*command_msg)[strings::params][strings::protocol_version].asInt());
}
} // namespace vr_get_supported_languages_request
diff --git a/src/components/application_manager/test/hmi_capabilities_test.cc b/src/components/application_manager/test/hmi_capabilities_test.cc
index e43caa9efe..8cacf4b4e4 100644
--- a/src/components/application_manager/test/hmi_capabilities_test.cc
+++ b/src/components/application_manager/test/hmi_capabilities_test.cc
@@ -33,8 +33,12 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
+#include "application_manager/hmi_capabilities_for_testing.h"
+
#include <algorithm>
+#include <memory>
#include <string>
+#include <vector>
#include "application_manager/hmi_capabilities.h"
#include "application_manager/mock_message_helper.h"
@@ -43,7 +47,6 @@
#include "smart_objects/enum_schema_item.h"
#include "smart_objects/smart_object.h"
-#include "application_manager/hmi_capabilities_for_testing.h"
#include "application_manager/mock_application_manager.h"
#include "application_manager/mock_application_manager_settings.h"
#include "application_manager/mock_event_dispatcher.h"
@@ -896,8 +899,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_application_manager_settings));
ON_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_file));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
DeleteFileIfExists(kAppInfoDataFile);
@@ -933,8 +935,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_application_manager_settings));
ON_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_file));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
DeleteFileIfExists(kAppInfoDataFile);
@@ -973,8 +974,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_application_manager_settings));
ON_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_file));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
EXPECT_CALL(*(MockMessageHelper::message_helper_mock()),
@@ -1068,8 +1068,7 @@ TEST_F(
.WillByDefault(ReturnRef(mock_application_manager_settings));
ON_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_invalid_file));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
auto hmi_capabilities =
@@ -1106,8 +1105,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_application_manager_settings));
ON_CALL(mock_application_manager_settings, hmi_capabilities_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_invalid_file));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
auto hmi_capabilities =
@@ -1133,8 +1131,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_dispatcher));
ON_CALL(mock_app_mngr, get_settings())
.WillByDefault(ReturnRef(mock_application_manager_settings));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(hmi_capabilities_empty_file_name));
auto hmi_capabilities =
@@ -1155,8 +1152,7 @@ TEST_F(HMICapabilitiesTest, SaveCachedCapabilitiesToFile_ParseFile_Failed) {
.WillByDefault(ReturnRef(mock_dispatcher));
ON_CALL(mock_app_mngr, get_settings())
.WillByDefault(ReturnRef(mock_application_manager_settings));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
auto hmi_capabilities =
@@ -1183,8 +1179,7 @@ TEST_F(HMICapabilitiesTest,
.WillByDefault(ReturnRef(mock_dispatcher));
ON_CALL(mock_app_mngr, get_settings())
.WillByDefault(ReturnRef(mock_application_manager_settings));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
auto hmi_capabilities =
@@ -1202,7 +1197,7 @@ TEST_F(HMICapabilitiesTest,
std::string content_after_update;
EXPECT_TRUE(file_system::ReadFile(file_cache_name_, content_after_update));
- EXPECT_NE(content_after_update, content_to_save);
+ EXPECT_NE(content_to_save, content_after_update);
}
TEST_F(HMICapabilitiesTest, PrepareJsonValueForSaving_Success) {
@@ -1240,8 +1235,7 @@ TEST_F(HMICapabilitiesTest, PrepareJsonValueForSaving_Success) {
.WillByDefault(ReturnRef(mock_dispatcher));
ON_CALL(mock_app_mngr, get_settings())
.WillByDefault(ReturnRef(mock_application_manager_settings));
- ON_CALL(mock_application_manager_settings,
- hmi_capabilities_cache_file_name())
+ ON_CALL(mock_application_manager_settings, hmi_capabilities_cache_file_name())
.WillByDefault(ReturnRef(file_cache_name_));
auto hmi_capabilities =
@@ -1252,7 +1246,7 @@ TEST_F(HMICapabilitiesTest, PrepareJsonValueForSaving_Success) {
file_system::Write(file_cache_name_, binary_data_to_save);
- for (size_t i = 0; i < interfaces_name.size(); i++) {
+ for (size_t i = 0; i < interfaces_name.size(); ++i) {
EXPECT_TRUE(hmi_capabilities->SaveCachedCapabilitiesToFile(
interfaces_name[i], sections_to_update, schema));
}
@@ -1264,7 +1258,7 @@ TEST_F(HMICapabilitiesTest, PrepareJsonValueForSaving_Success) {
utils::JsonReader reader;
EXPECT_TRUE(reader.parse(content_after_update, &root_node));
- for (size_t i = 0; i < interfaces_name.size(); i++) {
+ for (size_t i = 0; i < interfaces_name.size(); ++i) {
EXPECT_TRUE(static_cast<bool>(root_node[interfaces_name[i]]));
}
}