blob: 5a56ba0efcbb5de5fed9fb0ff8533a46dea2507b [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
Alex Deymo759c2752014-03-17 21:09:36 -07005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H_
Darin Petkov1cbd78f2010-07-29 12:38:34 -07007
8#include "gmock/gmock.h"
Jay Srinivasand29695d2013-04-08 15:08:05 -07009#include "update_engine/constants.h"
Darin Petkov1cbd78f2010-07-29 12:38:34 -070010#include "update_engine/prefs_interface.h"
11
12namespace chromeos_update_engine {
13
14class PrefsMock : public PrefsInterface {
15 public:
16 MOCK_METHOD2(GetString, bool(const std::string& key, std::string* value));
17 MOCK_METHOD2(SetString, bool(const std::string& key,
18 const std::string& value));
19 MOCK_METHOD2(GetInt64, bool(const std::string& key, int64_t* value));
20 MOCK_METHOD2(SetInt64, bool(const std::string& key, const int64_t value));
Jay Srinivasan480ddfa2012-06-01 19:15:26 -070021
Alex Deymoefb7c4c2013-07-09 14:34:00 -070022 MOCK_METHOD2(GetBoolean, bool(const std::string& key, bool* value));
23 MOCK_METHOD2(SetBoolean, bool(const std::string& key, const bool value));
24
Jay Srinivasan480ddfa2012-06-01 19:15:26 -070025 MOCK_METHOD1(Exists, bool(const std::string& key));
26 MOCK_METHOD1(Delete, bool(const std::string& key));
Darin Petkov1cbd78f2010-07-29 12:38:34 -070027};
28
29} // namespace chromeos_update_engine
30
Alex Deymo759c2752014-03-17 21:09:36 -070031#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_PREFS_MOCK_H_