blob: 1260043532b5eb7317ded000c1c15c284c19eb13 [file] [log] [blame]
tbarzic340a4aa2011-06-09 20:27:58 -07001// 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 Vakulenko015efd12014-07-30 16:23:04 -07005#ifndef IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_
6#define IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_
7
Ben Chan26c33e72014-08-07 00:30:44 -07008#include <stdint.h>
9
tbarzic340a4aa2011-06-09 20:27:58 -070010#include <string>
11
Ben Chan617dbb82014-06-17 22:46:34 -070012#include <gmock/gmock.h>
13#include <gtest/gtest.h>
14
15#include "image-burner/image_burner_utils_interfaces.h"
tbarzic340a4aa2011-06-09 20:27:58 -070016
17namespace imageburn {
18
19class 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
26class MockFileSystemReader : public FileSystemReader {
27 public:
28 MOCK_METHOD1(Open, bool(const char*));
29 MOCK_METHOD0(Close, bool());
Ben Chan26c33e72014-08-07 00:30:44 -070030 MOCK_METHOD0(GetSize, int64_t());
tbarzic340a4aa2011-06-09 20:27:58 -070031 MOCK_METHOD2(Read, int(char*, int));
32};
33
34class MockSignalSender : public SignalSender {
35 public:
36 MOCK_METHOD3(SendFinishedSignal, void(const char*, bool, const char*));
Ben Chan26c33e72014-08-07 00:30:44 -070037 MOCK_METHOD3(SendProgressSignal, void(int64_t, int64_t, const char*));
tbarzic340a4aa2011-06-09 20:27:58 -070038};
39
40class MockRootPathGetter : public RootPathGetter {
41 public:
42 MOCK_METHOD1(GetRootPath, bool(std::string*));
43};
44
Ben Chan617dbb82014-06-17 22:46:34 -070045} // namespace imageburn
tbarzic340a4aa2011-06-09 20:27:58 -070046
Alex Vakulenko015efd12014-07-30 16:23:04 -070047#endif // IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_