summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIra Lytvynenko <ILytvynenko@luxoft.com>2018-03-13 11:59:32 +0200
committerIra Lytvynenko (GitHub) <ILytvynenko@luxoft.com>2018-06-26 12:01:46 +0300
commit1af433bf1b0b31143a0e7d06800523589c660c0e (patch)
tree1c04144ecaacbf8319c4d489f4b966b3e3ad9f23 /src
parent0cacf13d7df8aa08fa312612f6f3d81e970eb6bf (diff)
downloadsdl_core-1af433bf1b0b31143a0e7d06800523589c660c0e.tar.gz
Fix UTs
Conflicts: src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
Diffstat (limited to 'src')
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc2
-rw-r--r--src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h12
4 files changed, 13 insertions, 5 deletions
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
index 5098f6472e..7ab4819002 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/button_press_request_test.cc
@@ -130,6 +130,8 @@ class ButtonPressRequestTest
CheckHMIType(kPolicyAppId,
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
nullptr)).WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
index 5aecb8664b..594cf62c58 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/get_interior_vehicle_data_request_test.cc
@@ -100,6 +100,8 @@ class GetInteriorVehicleDataRequestTest
CheckHMIType(
_, mobile_apis::AppHMIType::eType::REMOTE_CONTROL, nullptr))
.WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
index 68985e5f94..1d5e63e2df 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/commands/set_interior_vehicle_data_request_test.cc
@@ -89,6 +89,8 @@ class SetInteriorVehicleDataRequestTest
CheckHMIType(kPolicyAppId,
mobile_apis::AppHMIType::eType::REMOTE_CONTROL,
nullptr)).WillByDefault(Return(true));
+ ON_CALL(mock_allocation_manager_, is_rc_enabled())
+ .WillByDefault(Return(true));
}
MessageSharedPtr CreateBasicMessage() {
diff --git a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
index eae4effc1d..e34cc83d62 100644
--- a/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
+++ b/src/components/application_manager/rpc_plugins/rc_rpc_plugin/test/include/rc_rpc_plugin/mock/mock_resource_allocation_manager.h
@@ -4,14 +4,14 @@
#include "gmock/gmock.h"
#include "application_manager/rpc_plugins/rc_rpc_plugin/include/rc_rpc_plugin/resource_allocation_manager.h"
-namespace rc_rpc_plugin_test{
+namespace rc_rpc_plugin_test {
class MockResourceAllocationManager
: public rc_rpc_plugin::ResourceAllocationManager {
public:
MOCK_METHOD2(AcquireResource,
- rc_rpc_plugin::AcquireResult::eType
- (const std::string& module_type, const uint32_t app_id));
+ rc_rpc_plugin::AcquireResult::eType(
+ const std::string& module_type, const uint32_t app_id));
MOCK_METHOD2(ForceAcquireResource,
void(const std::string& module_type, const uint32_t app_id));
MOCK_METHOD2(OnDriverDisallowed,
@@ -19,7 +19,8 @@ class MockResourceAllocationManager
MOCK_METHOD2(OnApplicationEvent,
void(application_manager::plugin_manager::ApplicationEvent event,
application_manager::ApplicationSharedPtr application));
- MOCK_METHOD1(OnPolicyEvent, void(application_manager::plugin_manager::PolicyEvent event));
+ MOCK_METHOD1(OnPolicyEvent,
+ void(application_manager::plugin_manager::PolicyEvent event));
MOCK_METHOD1(SetAccessMode,
void(const hmi_apis::Common_RCAccessMode::eType access_mode));
MOCK_CONST_METHOD0(GetAccessMode, hmi_apis::Common_RCAccessMode::eType());
@@ -29,7 +30,8 @@ class MockResourceAllocationManager
const rc_rpc_plugin::ResourceState::eType state));
MOCK_CONST_METHOD1(IsResourceFree, bool(const std::string& module_type));
MOCK_METHOD1(GetApplicationExtention,
- rc_rpc_plugin::RCAppExtensionPtr(application_manager::ApplicationSharedPtr application));
+ rc_rpc_plugin::RCAppExtensionPtr(
+ application_manager::ApplicationSharedPtr application));
MOCK_METHOD0(ResetAllAllocations, void());
};