Alex Deymo | 41a75a7 | 2014-04-15 15:36:22 -0700 | [diff] [blame] | 1 | // 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 | |
| 5 | #ifndef CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_MOCK_VARIABLE_H_ |
| 6 | #define CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_MOCK_VARIABLE_H_ |
| 7 | |
| 8 | #include <gmock/gmock.h> |
| 9 | |
| 10 | #include "update_engine/policy_manager/variable.h" |
| 11 | |
| 12 | namespace chromeos_policy_manager { |
| 13 | |
| 14 | // This is a generic mock of the Variable class. |
| 15 | template<typename T> |
| 16 | class 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 | |
| 26 | } // namespace chromeos_policy_manager |
| 27 | |
| 28 | #endif // CHROMEOS_PLATFORM_UPDATE_ENGINE_POLICY_MANAGER_MOCK_VARIABLE_H_ |