diff options
author | Andrey Oleynik (GitHub) <aoleynik@luxoft.com> | 2017-11-30 09:43:44 +0200 |
---|---|---|
committer | Andriy Byzhynar <AByzhynar@luxoft.com> | 2018-01-18 12:03:51 +0200 |
commit | 2c207377259ad01c7f231533ba7189008d03a898 (patch) | |
tree | f91c3b38a57e97254e18147cd6db9ae9552a7a8c /src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc | |
parent | ee1d2d7677a7d94da43cc8b1e047bdd816e5fd83 (diff) | |
download | sdl_core-2c207377259ad01c7f231533ba7189008d03a898.tar.gz |
Updates mocks and unit tests after prior commit
Fixes mock classes interfaces, unit tests and build after changes
related to making iAP2 switching triggered externally and using of
Bluetooth MAC/USB serial instead of UUID for internal device management.
Diffstat (limited to 'src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc')
-rw-r--r-- | src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc index 4de7be7c4c..471270f9b8 100644 --- a/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc +++ b/src/components/application_manager/test/application_manager_impl_mock_hmi_test.cc @@ -39,6 +39,7 @@ #include "application_manager/application_manager_impl.h" #include "utils/custom_string.h" #include "utils/make_shared.h" +#include "encryption/hashing.h" #include "application_manager/mock_application_manager_settings.h" #include "application_manager/mock_resumption_data.h" @@ -162,7 +163,7 @@ TEST_F(ApplicationManagerImplMockHmiTest, utils::SharedPtr<ApplicationImpl> app_impl = new ApplicationImpl( application_id, policy_app_id, - mac_address, + encryption::MakeHash(mac_address), device_id, app_name, utils::SharedPtr<usage_statistics::StatisticsManager>( @@ -171,11 +172,25 @@ TEST_F(ApplicationManagerImplMockHmiTest, app_manager_impl_->AddMockApplication(app_impl); - app_manager_impl_->OnDeviceSwitchingStart(mac_address); + const connection_handler::Device bt(device_id, + "BT_device", + mac_address, + "BLUETOOTH"); + + const connection_handler::Device usb(device_id + 1, + "USB_device", + "USB_serial", + "USB_IOS"); MockHMICommandFactory* mock_hmi_factory = MockHMICommandFactory::mock_hmi_command_factory(); + // Skip sending notification on device switching as it is not the goal here + EXPECT_CALL(*mock_hmi_factory, CreateCommand(_, _)) + .WillOnce(Return(utils::SharedPtr<commands::Command>())); + + app_manager_impl_->OnDeviceSwitchingStart(bt, usb); + const uint32_t connection_key = 1u; const uint32_t correlation_id_1 = 1u; const uint32_t correlation_id_2 = 2u; |