blob: 9ba4a526f04992566c8c96f49a2e47381c44aa8c [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
Gilad Arnoldcf175a02014-07-10 16:48:47 -07005#ifndef UPDATE_ENGINE_PREFS_MOCK_H_
6#define UPDATE_ENGINE_PREFS_MOCK_H_
Darin Petkov1cbd78f2010-07-29 12:38:34 -07007
Alex Vakulenkod2779df2014-06-16 13:19:00 -07008#include <string>
9
Darin Petkov1cbd78f2010-07-29 12:38:34 -070010#include "gmock/gmock.h"
Jay Srinivasand29695d2013-04-08 15:08:05 -070011#include "update_engine/constants.h"
Darin Petkov1cbd78f2010-07-29 12:38:34 -070012#include "update_engine/prefs_interface.h"
13
14namespace chromeos_update_engine {
15
16class PrefsMock : public PrefsInterface {
17 public:
18 MOCK_METHOD2(GetString, bool(const std::string& key, std::string* value));
19 MOCK_METHOD2(SetString, bool(const std::string& key,
20 const std::string& value));
21 MOCK_METHOD2(GetInt64, bool(const std::string& key, int64_t* value));
22 MOCK_METHOD2(SetInt64, bool(const std::string& key, const int64_t value));
Jay Srinivasan480ddfa2012-06-01 19:15:26 -070023
Alex Deymoefb7c4c2013-07-09 14:34:00 -070024 MOCK_METHOD2(GetBoolean, bool(const std::string& key, bool* value));
25 MOCK_METHOD2(SetBoolean, bool(const std::string& key, const bool value));
26
Jay Srinivasan480ddfa2012-06-01 19:15:26 -070027 MOCK_METHOD1(Exists, bool(const std::string& key));
28 MOCK_METHOD1(Delete, bool(const std::string& key));
Darin Petkov1cbd78f2010-07-29 12:38:34 -070029};
30
31} // namespace chromeos_update_engine
32
Gilad Arnoldcf175a02014-07-10 16:48:47 -070033#endif // UPDATE_ENGINE_PREFS_MOCK_H_