blob: 72d6a8635aab8bae3c0be90c9c61f0a887a3f5fc [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:
Alex Deymo8427b4a2014-11-05 14:00:32 -080027 MOCK_METHOD2(Write, ssize_t(const void* bytes, size_t count));
28 MOCK_METHOD0(Close, int());
rspangler@google.com49fdf182009-10-10 00:57:34 +000029};
30
31} // namespace chromeos_update_engine
32
Gilad Arnoldcf175a02014-07-10 16:48:47 -070033#endif // UPDATE_ENGINE_MOCK_FILE_WRITER_H_