-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sdl passenger mode unit tests #14
Sdl passenger mode unit tests #14
Conversation
@@ -1794,24 +1794,36 @@ TEST_F(HMICommandsNotificationsTest, OnDriverDistractionNotificationEmptyData) { | |||
CreateCommand<hmi::OnDriverDistractionNotification>(message); | |||
|
|||
EXPECT_CALL(app_mngr_, set_driver_distraction_state(state)); | |||
EXPECT_CALL(app_mngr_, applications()).WillOnce(Return(applications_)); | |||
ON_CALL(app_mngr_, GetPolicyHandler()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan I would suggest you to extract these lines to a separate helper function as they are duplicated in at least 3 places
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AKalinich-Luxoft hmi_notifications_test.cc contains a lot of other tests, not related to the task. Most of them have different basic expectations. Helper function would be to specific to all this variety.
ON_CALL(app_mngr_, GetPolicyHandler()) | ||
.WillByDefault(ReturnRef(mock_policy_handler_interface_)); | ||
ON_CALL(mock_policy_handler_interface_, LockScreenDismissalEnabledState()) | ||
.WillByDefault(Return(utils::OptionalVal<bool>(true))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LuxoftAKutsan Why did not you use typedef in this translation unit like you did in other one?
Unit tests fix after implementation smartdevicelink#2134
Additional unit test for SDL passenger mode
lockScreenDismissalEnabled
addedFixed bug : crash on empty optional copy
This PR is ready for review.