summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAKalinich-Luxoft <AKalinich@luxoft.com>2018-05-25 20:30:11 +0300
committerAKalinich-Luxoft <AKalinich@luxoft.com>2018-06-15 17:09:13 +0300
commit89bda7d652d82747f87f2f0b71e6288806d5fff1 (patch)
treea025ca9611b5060da53498f103abb62df0053e56
parentef9b1420450d788f9412929f9d728019ce743805 (diff)
downloadsdl_core-89bda7d652d82747f87f2f0b71e6288806d5fff1.tar.gz
Fix affected UT and mocks
-rw-r--r--src/components/connection_handler/test/connection_handler_impl_test.cc10
-rw-r--r--src/components/include/test/security_manager/mock_security_manager.h1
-rw-r--r--src/components/include/test/security_manager/mock_security_manager_listener.h2
3 files changed, 2 insertions, 11 deletions
diff --git a/src/components/connection_handler/test/connection_handler_impl_test.cc b/src/components/connection_handler/test/connection_handler_impl_test.cc
index d0b9ce4ae4..56dbf6b9de 100644
--- a/src/components/connection_handler/test/connection_handler_impl_test.cc
+++ b/src/components/connection_handler/test/connection_handler_impl_test.cc
@@ -1273,9 +1273,6 @@ TEST_F(ConnectionHandlerTest, SessionStarted_WithRpc) {
true,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
-
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
EXPECT_CALL(mock_protocol_handler_, NotifySessionStarted(_, _))
.WillOnce(SaveArg<0>(&out_context_));
@@ -1312,8 +1309,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_SUCCESS) {
session_key,
true,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
@@ -1354,8 +1349,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_FAILURE) {
session_key,
false,
ByRef(empty)));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .WillOnce(Return(true));
// confirm that NotifySessionStarted() is called
connection_handler_->set_protocol_handler(&mock_protocol_handler_);
@@ -1446,9 +1439,6 @@ TEST_F(ConnectionHandlerTest, ServiceStarted_Video_Multiple) {
session_key1,
true,
ByRef(empty))));
- EXPECT_CALL(mock_connection_handler_observer, CheckAppIsNavi(_))
- .Times(2)
- .WillRepeatedly(Return(true));
// verify that connection handler will not mix up the two results
SessionContext new_context_first, new_context_second;
diff --git a/src/components/include/test/security_manager/mock_security_manager.h b/src/components/include/test/security_manager/mock_security_manager.h
index 153ce85422..b2c2e3bf17 100644
--- a/src/components/include/test/security_manager/mock_security_manager.h
+++ b/src/components/include/test/security_manager/mock_security_manager.h
@@ -68,6 +68,7 @@ class MockSecurityManager : public ::security_manager::SecurityManager {
void(const ::protocol_handler::RawMessagePtr));
MOCK_METHOD1(IsCertificateUpdateRequired, bool(const uint32_t));
MOCK_METHOD0(NotifyOnCertificateUpdateRequired, void());
+ MOCK_METHOD0(NotifyListenersOnHandshakeFailed, void());
MOCK_METHOD0(IsPolicyCertificateDataEmpty, bool());
MOCK_METHOD1(OnCertificateUpdated, bool(const std::string&));
MOCK_METHOD1(PostponeHandshake, void(const uint32_t));
diff --git a/src/components/include/test/security_manager/mock_security_manager_listener.h b/src/components/include/test/security_manager/mock_security_manager_listener.h
index 76273b244d..7a7714d299 100644
--- a/src/components/include/test/security_manager/mock_security_manager_listener.h
+++ b/src/components/include/test/security_manager/mock_security_manager_listener.h
@@ -49,7 +49,7 @@ class MockSecurityManagerListener
::security_manager::SSLContext::HandshakeResult result));
MOCK_METHOD0(OnCertificateUpdateRequired, void());
MOCK_CONST_METHOD1(GetPolicyCertificateData, bool(std::string& data));
- MOCK_METHOD0(OnHandshakeFailed, void());
+ MOCK_METHOD0(OnHandshakeFailed, bool());
};
} // namespace security_manager_test
} // namespace components