summaryrefslogtreecommitdiff
path: root/src/components/application_manager/test/commands/command_impl_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/application_manager/test/commands/command_impl_test.cc')
-rw-r--r--src/components/application_manager/test/commands/command_impl_test.cc39
1 files changed, 21 insertions, 18 deletions
diff --git a/src/components/application_manager/test/commands/command_impl_test.cc b/src/components/application_manager/test/commands/command_impl_test.cc
index bb56e984e5..ff9634cbb1 100644
--- a/src/components/application_manager/test/commands/command_impl_test.cc
+++ b/src/components/application_manager/test/commands/command_impl_test.cc
@@ -49,6 +49,7 @@
namespace test {
namespace components {
namespace commands_test {
+namespace command_impl {
using ::testing::Return;
using ::testing::AtLeast;
@@ -82,8 +83,8 @@ class CommandImplTest : public CommandsTest<CommandsTestMocks::kIsNice> {
public:
class UnwrappedCommandImpl : CommandImpl {
public:
- using CommandImpl::ReplaceMobileByHMIAppId;
- using CommandImpl::ReplaceHMIByMobileAppId;
+ using CommandImpl::ReplaceMobileWithHMIAppId;
+ using CommandImpl::ReplaceHMIWithMobileAppId;
UnwrappedCommandImpl(const MessageSharedPtr& message,
ApplicationManager& application_manager)
@@ -150,16 +151,16 @@ TEST_F(CommandImplTest, GetMethods_SUCCESS) {
EXPECT_NO_THROW(command->onTimeOut());
}
-TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_NoAppIdInMessage_UNSUCCESS) {
+TEST_F(CommandImplTest, ReplaceMobileWithHMIAppId_NoAppIdInMessage_UNSUCCESS) {
MessageSharedPtr msg;
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
EXPECT_CALL(app_mngr_, application(_)).Times(0);
- command->ReplaceMobileByHMIAppId(*msg);
+ command->ReplaceMobileWithHMIAppId(*msg);
}
-TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceMobileWithHMIAppId_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
(*msg)[strings::app_id] = kAppId1;
@@ -170,12 +171,12 @@ TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_SUCCESS) {
EXPECT_CALL(app_mngr_, application(kAppId1)).WillOnce(Return(app));
ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceMobileByHMIAppId(*msg);
+ command->ReplaceMobileWithHMIAppId(*msg);
EXPECT_EQ(kAppId2, (*msg)[strings::app_id].asUInt());
}
-TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_Array_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceMobileWithHMIAppId_Array_SUCCESS) {
MessageSharedPtr msg = CreateArrayMessage(kDefaultMsgCount);
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
@@ -186,14 +187,14 @@ TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_Array_SUCCESS) {
.WillRepeatedly(Return(app));
ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceMobileByHMIAppId(*msg);
+ command->ReplaceMobileWithHMIAppId(*msg);
EXPECT_TRUE(msg->asArray());
std::for_each(
msg->asArray()->begin(), msg->asArray()->end(), ExpectEqualAppId);
}
-TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_Map_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceMobileWithHMIAppId_Map_SUCCESS) {
MessageSharedPtr msg = CreateMapMessage(kDefaultMsgCount);
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
@@ -204,7 +205,7 @@ TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_Map_SUCCESS) {
.WillRepeatedly(Return(app));
ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceMobileByHMIAppId(*msg);
+ command->ReplaceMobileWithHMIAppId(*msg);
std::set<std::string> keys(msg->enumerate());
std::for_each(keys.begin(),
@@ -212,16 +213,17 @@ TEST_F(CommandImplTest, ReplaceMobileByHMIAppId_Map_SUCCESS) {
std::bind2nd(std::ptr_fun(&ExpectEqualKeyAppId), msg));
}
-TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_NoHMIAppIdInMessage_UNSUCCESS) {
+TEST_F(CommandImplTest,
+ ReplaceHMIWithMobileAppId_NoHMIAppIdInMessage_UNSUCCESS) {
MessageSharedPtr msg;
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
EXPECT_CALL(app_mngr_, application_by_hmi_app(_)).Times(0);
- command->ReplaceHMIByMobileAppId(*msg);
+ command->ReplaceHMIWithMobileAppId(*msg);
}
-TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceHMIWithMobileAppId_SUCCESS) {
MessageSharedPtr msg = CreateMessage();
(*msg)[strings::app_id] = kAppId1;
@@ -232,12 +234,12 @@ TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_SUCCESS) {
EXPECT_CALL(app_mngr_, application_by_hmi_app(kAppId1)).WillOnce(Return(app));
ON_CALL(*app, app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceHMIByMobileAppId(*msg);
+ command->ReplaceHMIWithMobileAppId(*msg);
EXPECT_EQ(kAppId2, (*msg)[strings::app_id].asUInt());
}
-TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_Array_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceHMIWithMobileAppId_Array_SUCCESS) {
MessageSharedPtr msg = CreateArrayMessage(kDefaultMsgCount);
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
@@ -248,14 +250,14 @@ TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_Array_SUCCESS) {
.WillRepeatedly(Return(app));
ON_CALL(*app, app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceHMIByMobileAppId(*msg);
+ command->ReplaceHMIWithMobileAppId(*msg);
EXPECT_TRUE(msg->asArray());
std::for_each(
msg->asArray()->begin(), msg->asArray()->end(), ExpectEqualAppId);
}
-TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_Map_SUCCESS) {
+TEST_F(CommandImplTest, ReplaceHMIWithMobileAppId_Map_SUCCESS) {
MessageSharedPtr msg = CreateMapMessage(kDefaultMsgCount);
UCommandImplPtr command = CreateCommand<UCommandImpl>(msg);
@@ -266,7 +268,7 @@ TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_Map_SUCCESS) {
.WillRepeatedly(Return(app));
ON_CALL(*app, app_id()).WillByDefault(Return(kAppId2));
- command->ReplaceHMIByMobileAppId(*msg);
+ command->ReplaceHMIWithMobileAppId(*msg);
std::set<std::string> keys = msg->enumerate();
std::for_each(keys.begin(),
@@ -274,6 +276,7 @@ TEST_F(CommandImplTest, ReplaceHMIByMobileAppId_Map_SUCCESS) {
std::bind2nd(std::ptr_fun(&ExpectEqualKeyAppId), msg));
}
+} // namespace command_impl
} // namespace commands_test
} // namespace components
} // namespace test