tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 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 Vakulenko | 015efd1 | 2014-07-30 16:23:04 -0700 | [diff] [blame] | 5 | #ifndef IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_ |
| 6 | #define IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_ |
| 7 | |
Ben Chan | 26c33e7 | 2014-08-07 00:30:44 -0700 | [diff] [blame^] | 8 | #include <stdint.h> |
| 9 | |
tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 10 | #include <string> |
| 11 | |
Ben Chan | 617dbb8 | 2014-06-17 22:46:34 -0700 | [diff] [blame] | 12 | #include <gmock/gmock.h> |
| 13 | #include <gtest/gtest.h> |
| 14 | |
| 15 | #include "image-burner/image_burner_utils_interfaces.h" |
tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 16 | |
| 17 | namespace imageburn { |
| 18 | |
| 19 | class MockFileSystemWriter : public FileSystemWriter { |
| 20 | public: |
| 21 | MOCK_METHOD1(Open, bool(const char*)); |
| 22 | MOCK_METHOD0(Close, bool()); |
| 23 | MOCK_METHOD2(Write, int(char*, int)); |
| 24 | }; |
| 25 | |
| 26 | class MockFileSystemReader : public FileSystemReader { |
| 27 | public: |
| 28 | MOCK_METHOD1(Open, bool(const char*)); |
| 29 | MOCK_METHOD0(Close, bool()); |
Ben Chan | 26c33e7 | 2014-08-07 00:30:44 -0700 | [diff] [blame^] | 30 | MOCK_METHOD0(GetSize, int64_t()); |
tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 31 | MOCK_METHOD2(Read, int(char*, int)); |
| 32 | }; |
| 33 | |
| 34 | class MockSignalSender : public SignalSender { |
| 35 | public: |
| 36 | MOCK_METHOD3(SendFinishedSignal, void(const char*, bool, const char*)); |
Ben Chan | 26c33e7 | 2014-08-07 00:30:44 -0700 | [diff] [blame^] | 37 | MOCK_METHOD3(SendProgressSignal, void(int64_t, int64_t, const char*)); |
tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 38 | }; |
| 39 | |
| 40 | class MockRootPathGetter : public RootPathGetter { |
| 41 | public: |
| 42 | MOCK_METHOD1(GetRootPath, bool(std::string*)); |
| 43 | }; |
| 44 | |
Ben Chan | 617dbb8 | 2014-06-17 22:46:34 -0700 | [diff] [blame] | 45 | } // namespace imageburn |
tbarzic | 340a4aa | 2011-06-09 20:27:58 -0700 | [diff] [blame] | 46 | |
Alex Vakulenko | 015efd1 | 2014-07-30 16:23:04 -0700 | [diff] [blame] | 47 | #endif // IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_ |