blob: 65a55311ebc5b7921b2841b293be20bd34864bb6 [file] [log] [blame]
Alex Deymo8427b4a2014-11-05 14:00:32 -08001// Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
rspangler@google.com49fdf182009-10-10 00:57:34 +00002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_MOCK_FILE_WRITER_H_
6#define UPDATE_ENGINE_MOCK_FILE_WRITER_H_
rspangler@google.com49fdf182009-10-10 00:57:34 +00007
Alex Deymo8427b4a2014-11-05 14:00:32 -08008#include <gmock/gmock.h>
rspangler@google.com49fdf182009-10-10 00:57:34 +00009#include "update_engine/file_writer.h"
10
rspangler@google.com49fdf182009-10-10 00:57:34 +000011namespace chromeos_update_engine {
12
13class MockFileWriter : public FileWriter {
14 public:
Alex Deymo8427b4a2014-11-05 14:00:32 -080015 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());
rspangler@google.com49fdf182009-10-10 00:57:34 +000018};
19
20} // namespace chromeos_update_engine
21
Gilad Arnoldcf175a02014-07-10 16:48:47 -070022#endif // UPDATE_ENGINE_MOCK_FILE_WRITER_H_