blob: c2ba375b2e0f4fd86ae7792f2dc30df1148dd743 [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
Alex Deymo63784a52014-05-28 10:46:14 -07005#ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_
6#define CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_
Alex Deymo41a75a72014-04-15 15:36:22 -07007
8#include <gmock/gmock.h>
9
Alex Deymo63784a52014-05-28 10:46:14 -070010#include "update_engine/update_manager/variable.h"
Alex Deymo41a75a72014-04-15 15:36:22 -070011
Alex Deymo63784a52014-05-28 10:46:14 -070012namespace chromeos_update_manager {
Alex Deymo41a75a72014-04-15 15:36:22 -070013
14// This is a generic mock of the Variable class.
15template<typename T>
16class MockVariable : public Variable<T> {
17 public:
18 using Variable<T>::Variable;
19
20 MOCK_METHOD2_T(GetValue, const T*(base::TimeDelta, std::string*));
21
22 private:
23 DISALLOW_COPY_AND_ASSIGN(MockVariable);
24};
25
Alex Deymo63784a52014-05-28 10:46:14 -070026} // namespace chromeos_update_manager
Alex Deymo41a75a72014-04-15 15:36:22 -070027
Alex Deymo63784a52014-05-28 10:46:14 -070028#endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_