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 | |
Gilad Arnold | 48415f1 | 2014-06-27 07:10:58 -0700 | [diff] [blame^] | 5 | #ifndef UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_ |
| 6 | #define UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_ |
| 7 | |
| 8 | #include <string> |
Alex Deymo | 41a75a7 | 2014-04-15 15:36:22 -0700 | [diff] [blame] | 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
Alex Deymo | 63784a5 | 2014-05-28 10:46:14 -0700 | [diff] [blame] | 12 | #include "update_engine/update_manager/variable.h" |
Alex Deymo | 41a75a7 | 2014-04-15 15:36:22 -0700 | [diff] [blame] | 13 | |
Alex Deymo | 63784a5 | 2014-05-28 10:46:14 -0700 | [diff] [blame] | 14 | namespace chromeos_update_manager { |
Alex Deymo | 41a75a7 | 2014-04-15 15:36:22 -0700 | [diff] [blame] | 15 | |
| 16 | // This is a generic mock of the Variable class. |
| 17 | template<typename T> |
| 18 | class 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 Deymo | 63784a5 | 2014-05-28 10:46:14 -0700 | [diff] [blame] | 28 | } // namespace chromeos_update_manager |
Alex Deymo | 41a75a7 | 2014-04-15 15:36:22 -0700 | [diff] [blame] | 29 | |
Gilad Arnold | 48415f1 | 2014-06-27 07:10:58 -0700 | [diff] [blame^] | 30 | #endif // UPDATE_ENGINE_UPDATE_MANAGER_MOCK_VARIABLE_H_ |