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