diff options
Diffstat (limited to 'src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc')
-rw-r--r-- | src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc | 54 |
1 files changed, 32 insertions, 22 deletions
diff --git a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc b/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc index 7e7d1f6350..bb1a5c168b 100644 --- a/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc +++ b/src/components/application_manager/test/commands/mobile/delete_interaction_choice_set_test.cc @@ -194,19 +194,22 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, EXPECT_CALL(app_mngr_, application(kConnectionKey)) .WillRepeatedly(Return(app_)); - InSequence seq; + { + InSequence seq; - EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) - .WillOnce(Return(choice_set_id)); - EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false)); - EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0); + EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) + .WillOnce(Return(choice_set_id)); + EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false)); + EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0); - EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) - .WillOnce(Return(invalid_choice_set_id)); + EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) + .WillOnce(Return(invalid_choice_set_id)); - EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey)); - EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId)); - EXPECT_CALL(*app_, UpdateHash()); + EXPECT_CALL(*app_, app_id()).WillOnce(Return(kConnectionKey)); + EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId)); + EXPECT_CALL(*app_, UpdateHash()); + } + ON_CALL(app_mngr_, GetRPCService()).WillByDefault(ReturnRef(rpc_service_)); DeleteInteractionChoiceSetRequestPtr command = CreateCommand<DeleteInteractionChoiceSetRequest>(message_); @@ -229,21 +232,28 @@ TEST_F(DeleteInteractionChoiceSetRequestTest, Run_SendVrDeleteCommand_SUCCESS) { EXPECT_CALL(app_mngr_, application(kConnectionKey)) .WillRepeatedly(Return(app_)); - InSequence seq; + { + InSequence seq; - EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) - .WillOnce(Return(choice_set_id)); - EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false)); - EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0); + EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) + .WillOnce(Return(choice_set_id)); + EXPECT_CALL(*app_, is_perform_interaction_active()).WillOnce(Return(false)); + EXPECT_CALL(*app_, performinteraction_choice_set_map()).Times(0); - EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) - .WillOnce(Return(choice_set_id)); + EXPECT_CALL(*app_, FindChoiceSet(kChoiceSetId)) + .WillOnce(Return(choice_set_id)); - EXPECT_CALL(*app_, app_id()) - .WillOnce(Return(kConnectionKey)) - .WillOnce(Return(kConnectionKey)); - EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId)); - EXPECT_CALL(*app_, UpdateHash()); + EXPECT_CALL(*app_, app_id()) + .WillOnce(Return(kConnectionKey)) + .WillOnce(Return(kConnectionKey)); + EXPECT_CALL(*app_, RemoveChoiceSet(kChoiceSetId)); + EXPECT_CALL(*app_, UpdateHash()); + } + EXPECT_CALL(app_mngr_, GetRPCService()) + .Times(2) + .WillRepeatedly(ReturnRef(rpc_service_)); + EXPECT_CALL(rpc_service_, ManageHMICommand(_)).WillOnce(Return(true)); + EXPECT_CALL(rpc_service_, ManageMobileCommand(_, _)); DeleteInteractionChoiceSetRequestPtr command = CreateCommand<DeleteInteractionChoiceSetRequest>(message_); |