blob: 26cd45d059975221dd7523020ad54c72a2c005b4 [file] [log] [blame]
Alex Deymoaea4c1c2015-08-19 20:24:43 -07001//
2// Copyright (C) 2010 The Android Open Source Project
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15//
rspangler@google.com49fdf182009-10-10 00:57:34 +000016
Gilad Arnoldcf175a02014-07-10 16:48:47 -070017#ifndef UPDATE_ENGINE_MOCK_FILE_WRITER_H_
18#define UPDATE_ENGINE_MOCK_FILE_WRITER_H_
rspangler@google.com49fdf182009-10-10 00:57:34 +000019
Alex Deymo8427b4a2014-11-05 14:00:32 -080020#include <gmock/gmock.h>
Alex Deymo39910dc2015-11-09 17:04:30 -080021#include "update_engine/payload_consumer/file_writer.h"
rspangler@google.com49fdf182009-10-10 00:57:34 +000022
rspangler@google.com49fdf182009-10-10 00:57:34 +000023namespace chromeos_update_engine {
24
25class MockFileWriter : public FileWriter {
26 public:
Aaron Wood9321f502017-09-07 11:18:54 -070027 MOCK_METHOD2(Write, bool(const void* bytes, size_t count));
28 MOCK_METHOD3(Write, bool(const void* bytes, size_t count, ErrorCode* error));
Alex Deymo8427b4a2014-11-05 14:00:32 -080029 MOCK_METHOD0(Close, int());
rspangler@google.com49fdf182009-10-10 00:57:34 +000030};
31
32} // namespace chromeos_update_engine
33
Gilad Arnoldcf175a02014-07-10 16:48:47 -070034#endif // UPDATE_ENGINE_MOCK_FILE_WRITER_H_