diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2017-08-22 11:31:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 11:31:44 -0400 |
commit | 473506b5d090270bac8c5d19d23d34656b3d8fb6 (patch) | |
tree | 26d7ac8b034b5462f448ac65a598cf93353490f0 | |
parent | 5fcb0ef3bf43370b0d579bf23ef6764af75a97de (diff) | |
parent | 838fd42094938a31bee3bcecb5c852ca65261332 (diff) | |
download | sdl_core-473506b5d090270bac8c5d19d23d34656b3d8fb6.tar.gz |
Merge pull request #1732 from smartdevicelink/hotfix/list_files_test
Fix ListFiles test failure
-rw-r--r-- | src/components/application_manager/test/commands/mobile/list_files_request_test.cc | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc b/src/components/application_manager/test/commands/mobile/list_files_request_test.cc index 85377054ef..ae0e523832 100644 --- a/src/components/application_manager/test/commands/mobile/list_files_request_test.cc +++ b/src/components/application_manager/test/commands/mobile/list_files_request_test.cc @@ -61,7 +61,12 @@ using am::commands::ListFilesRequest; using am::commands::MessageSharedPtr; class ListFilesRequestTest - : public CommandRequestTest<CommandsTestMocks::kIsNice> {}; + : public CommandRequestTest<CommandsTestMocks::kIsNice> { + public: + ListFilesRequestTest() : kStoragePath_("storage"), kResponseSize_(1) {} + const std::string kStoragePath_; + const uint32_t kResponseSize_; +}; TEST_F(ListFilesRequestTest, Run_AppNotRegistered_UNSUCCESS) { SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>()); @@ -105,7 +110,17 @@ TEST_F(ListFilesRequestTest, Run_SUCCESS) { MockAppPtr app(CreateMockApp()); SharedPtr<ListFilesRequest> command(CreateCommand<ListFilesRequest>()); + EXPECT_CALL(app_mngr_, get_settings()) + .WillRepeatedly(ReturnRef(app_mngr_settings_)); + + ON_CALL(app_mngr_settings_, app_storage_folder()) + .WillByDefault(ReturnRef(kStoragePath_)); + + ON_CALL(app_mngr_settings_, list_files_response_size()) + .WillByDefault(ReturnRef(kResponseSize_)); + ON_CALL(app_mngr_, application(_)).WillByDefault(Return(app)); + ON_CALL(*app, hmi_level()) .WillByDefault(Return(mobile_apis::HMILevel::HMI_FULL)); |