Darin Petkov | e971f33 | 2010-09-22 16:57:25 -0700 | [diff] [blame] | 1 | // Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H_ |
Darin Petkov | e971f33 | 2010-09-22 16:57:25 -0700 | [diff] [blame] | 7 | |
| 8 | #include "gmock/gmock.h" |
| 9 | #include "update_engine/file_writer.h" |
| 10 | |
| 11 | namespace chromeos_update_engine { |
| 12 | |
| 13 | class FileWriterMock : public FileWriter { |
| 14 | public: |
| 15 | MOCK_METHOD3(Open, int(const char* path, int flags, mode_t mode)); |
| 16 | MOCK_METHOD2(Write, ssize_t(const void* bytes, size_t count)); |
| 17 | MOCK_METHOD0(Close, int()); |
| 18 | }; |
| 19 | |
| 20 | } // namespace chromeos_update_engine |
| 21 | |
Alex Deymo | 759c275 | 2014-03-17 21:09:36 -0700 | [diff] [blame] | 22 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_FILE_WRITER_MOCK_H_ |