blob: 9fc8d72a926f75d81bc9e80c4e5c904306e773f3 [file] [log] [blame]
// Copyright (c) 2011 The Chromium OS Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_
#define IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_
#include <stdint.h>
#include <string>
#include <gmock/gmock.h>
#include <gtest/gtest.h>
#include "image-burner/image_burner_utils_interfaces.h"
namespace imageburn {
class MockFileSystemWriter : public FileSystemWriter {
public:
MOCK_METHOD1(Open, bool(const char*));
MOCK_METHOD0(Close, bool());
MOCK_METHOD2(Write, int(const char*, int));
};
class MockFileSystemReader : public FileSystemReader {
public:
MOCK_METHOD1(Open, bool(const char*));
MOCK_METHOD0(Close, bool());
MOCK_METHOD0(GetSize, int64_t());
MOCK_METHOD2(Read, int(char*, int));
};
class MockSignalSender : public SignalSender {
public:
MOCK_METHOD3(SendFinishedSignal, void(const char*, bool, const char*));
MOCK_METHOD3(SendProgressSignal, void(int64_t, int64_t, const char*));
};
class MockPathGetter : public PathGetter {
public:
MOCK_METHOD2(GetRealPath, bool(const char*, std::string*));
MOCK_METHOD1(GetRootPath, bool(std::string*));
};
} // namespace imageburn
#endif // IMAGE_BURNER_IMAGE_BURNER_TEST_UTILS_H_