summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndriy Byzhynar <AByzhynar@luxoft.com>2018-01-12 15:18:22 +0200
committerAndriy Byzhynar <AByzhynar@luxoft.com>2018-01-18 12:03:51 +0200
commitb9eae4e3a502ac653cb3ea76e542d69becd088ed (patch)
tree619b3c988cdab127f71c5bbaf71e66a428e70483
parenta56108fabda2fed248778cdb9778c8cd3162b762 (diff)
downloadsdl_core-b9eae4e3a502ac653cb3ea76e542d69becd088ed.tar.gz
Fix UT for activate_app_request
-rw-r--r--src/components/application_manager/test/commands/hmi/activate_app_request_test.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc b/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc
index 844f913025..7f7911a01d 100644
--- a/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc
+++ b/src/components/application_manager/test/commands/hmi/activate_app_request_test.cc
@@ -36,6 +36,7 @@
#include "smart_objects/smart_object.h"
#include "application_manager/commands/command_impl.h"
#include "commands/commands_test.h"
+#include "application_manager/mock_application.h"
namespace test {
namespace components {
@@ -44,12 +45,16 @@ namespace hmi_commands_test {
namespace activate_app_request {
using ::testing::_;
+using ::utils::SharedPtr;
namespace am = ::application_manager;
namespace strings = ::application_manager::strings;
using am::commands::MessageSharedPtr;
using am::commands::ActivateAppRequest;
using am::commands::CommandImpl;
+using ::test::components::application_manager_test::MockApplication;
+
+typedef SharedPtr<MockApplication> MockAppPtr;
typedef ::utils::SharedPtr<ActivateAppRequest> ActivateAppRequestPtr;
MATCHER_P(CheckMessage, level, "") {
@@ -82,8 +87,13 @@ class ActivateAppRequestTest : public CommandsTest<CommandsTestMocks::kIsNice> {
TEST_F(ActivateAppRequestTest, Run_SUCCESS) {
MessageSharedPtr msg = CreateMsgParams();
+ MockAppPtr app = CreateMockApp();
+
+ EXPECT_CALL(app_mngr_, application(_)).WillRepeatedly(Return(app));
+
+ ON_CALL(*app, hmi_app_id()).WillByDefault(Return(kAppId));
-// TODO(OKozlov) Invastigate and fix issue with using log
+// TODO(OKozlov) Investigate and fix issue with using log
#ifdef ENABLE_LOG
(*msg)[strings::msg_params][strings::activate_app_hmi_level] =
mobile_apis::HMILevel::HMI_FULL;