| OLD | NEW |
| (Empty) |
| 1 // Copyright 2010 Google Inc. | |
| 2 // | |
| 3 // Licensed under the Apache License, Version 2.0 (the "License"); | |
| 4 // you may not use this file except in compliance with the License. | |
| 5 // You may obtain a copy of the License at | |
| 6 // | |
| 7 // http://www.apache.org/licenses/LICENSE-2.0 | |
| 8 // | |
| 9 // Unless required by applicable law or agreed to in writing, software | |
| 10 // distributed under the License is distributed on an "AS IS" BASIS, | |
| 11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 12 // See the License for the specific language governing permissions and | |
| 13 // limitations under the License. | |
| 14 // ======================================================================== | |
| 15 | |
| 16 #ifndef OMAHA_GOOPDATE_WORKER_MOCK_H_ | |
| 17 #define OMAHA_GOOPDATE_WORKER_MOCK_H_ | |
| 18 | |
| 19 #include "omaha/goopdate/worker.h" | |
| 20 #include "omaha/testing/unit_test.h" | |
| 21 | |
| 22 namespace omaha { | |
| 23 | |
| 24 class MockWorker : public WorkerModelInterface { | |
| 25 public: | |
| 26 MOCK_METHOD1(CheckForUpdateAsync, | |
| 27 HRESULT(AppBundle* app_bundle)); | |
| 28 MOCK_METHOD1(DownloadAsync, | |
| 29 HRESULT(AppBundle* app_bundle)); | |
| 30 MOCK_METHOD1(DownloadAndInstallAsync, | |
| 31 HRESULT(AppBundle* app_bundle)); | |
| 32 MOCK_METHOD1(UpdateAllAppsAsync, | |
| 33 HRESULT(AppBundle* app_bundle)); | |
| 34 MOCK_METHOD1(DownloadPackageAsync, | |
| 35 HRESULT(Package* package)); | |
| 36 MOCK_METHOD1(Stop, | |
| 37 HRESULT(AppBundle* app_bundle)); | |
| 38 MOCK_METHOD1(Pause, | |
| 39 HRESULT(AppBundle* app_bundle)); | |
| 40 MOCK_METHOD1(Resume, | |
| 41 HRESULT(AppBundle* app_bundle)); | |
| 42 MOCK_METHOD2(GetPackage, | |
| 43 HRESULT(const Package* package, const CString& dir)); | |
| 44 MOCK_CONST_METHOD1(IsPackageAvailable, | |
| 45 bool(const Package* package)); // NOLINT | |
| 46 MOCK_METHOD2(PurgeAppLowerVersions, | |
| 47 HRESULT(const CString&, const CString&)); | |
| 48 MOCK_METHOD0(Lock, | |
| 49 int()); | |
| 50 MOCK_METHOD0(Unlock, | |
| 51 int()); | |
| 52 }; | |
| 53 | |
| 54 } // namespace omaha | |
| 55 | |
| 56 #endif // OMAHA_GOOPDATE_WORKER_MOCK_H_ | |
| 57 | |
| OLD | NEW |