blob: 6be13e57619bbb5e57739f1c1695ef9212a90598 [file] [log] [blame]
Alex Deymo41a75a72014-04-15 15:36:22 -07001// Copyright 2014 The Chromium OS Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
Gilad Arnold48415f12014-06-27 07:10:58 -07005#ifndef UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_
6#define UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_
7
8#include <string>
Alex Deymo41a75a72014-04-15 15:36:22 -07009
10#include <gmock/gmock.h>
11
Alex Deymo63784a52014-05-28 10:46:14 -070012#include "update_engine/update_manager/variable.h"
Alex Deymo41a75a72014-04-15 15:36:22 -070013
Alex Deymo63784a52014-05-28 10:46:14 -070014namespace chromeos_update_manager {
Alex Deymo41a75a72014-04-15 15:36:22 -070015
16// This is a generic mock of the Variable class.
17template<typename T>
18class MockVariable : public Variable<T> {
19 public:
20 using Variable<T>::Variable;
21
22 MOCK_METHOD2_T(GetValue, const T*(base::TimeDelta, std::string*));
23
24 private:
25 DISALLOW_COPY_AND_ASSIGN(MockVariable);
26};
27
Alex Deymo63784a52014-05-28 10:46:14 -070028} // namespace chromeos_update_manager
Alex Deymo41a75a72014-04-15 15:36:22 -070029
Gilad Arnold48415f12014-06-27 07:10:58 -070030#endif // UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_