blob: 963b981868e25c730bd10c0e3790490260231794 [file] [log] [blame]
Jay Srinivasan480ddfa2012-06-01 19:15:26 -07001// Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
Darin Petkov1cbd78f2010-07-29 12:38:34 -07002// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H__
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H__
7
8#include "gmock/gmock.h"
9#include "update_engine/prefs_interface.h"
10
11namespace chromeos_update_engine {
12
13class PrefsMock : public PrefsInterface {
14 public:
15 MOCK_METHOD2(GetString, bool(const std::string& key, std::string* value));
16 MOCK_METHOD2(SetString, bool(const std::string& key,
17 const std::string& value));
18 MOCK_METHOD2(GetInt64, bool(const std::string& key, int64_t* value));
19 MOCK_METHOD2(SetInt64, bool(const std::string& key, const int64_t value));
Jay Srinivasan480ddfa2012-06-01 19:15:26 -070020
21 MOCK_METHOD1(Exists, bool(const std::string& key));
22 MOCK_METHOD1(Delete, bool(const std::string& key));
Darin Petkov1cbd78f2010-07-29 12:38:34 -070023};
24
25} // namespace chromeos_update_engine
26
27#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H__