Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 1 | // Copyright (c) 2011 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 SHILL_MOCK_ADAPTORS_ |
| 6 | #define SHILL_MOCK_ADAPTORS_ |
| 7 | |
| 8 | #include <string> |
| 9 | |
| 10 | #include <gmock/gmock.h> |
| 11 | |
| 12 | #include "shill/adaptor_interfaces.h" |
| 13 | |
| 14 | namespace shill { |
| 15 | |
| 16 | // These are the functions that a Manager adaptor must support |
| 17 | class ManagerMockAdaptor : public ManagerAdaptorInterface { |
| 18 | public: |
| 19 | ManagerMockAdaptor() {} |
| 20 | virtual ~ManagerMockAdaptor() {} |
| 21 | MOCK_METHOD0(UpdateRunning, void(void)); |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 22 | MOCK_METHOD2(EmitBoolChanged, void(const std::string&, bool)); |
| 23 | MOCK_METHOD2(EmitUintChanged, void(const std::string&, uint32)); |
| 24 | MOCK_METHOD2(EmitIntChanged, void(const std::string&, int)); |
| 25 | MOCK_METHOD2(EmitStringChanged, void(const std::string&, const std::string&)); |
| 26 | |
| 27 | MOCK_METHOD1(EmitStateChanged, void(const std::string&)); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 28 | }; |
| 29 | |
| 30 | // These are the functions that a Service adaptor must support |
| 31 | class ServiceMockAdaptor : public ServiceAdaptorInterface { |
| 32 | public: |
| 33 | ServiceMockAdaptor() {} |
| 34 | virtual ~ServiceMockAdaptor() {} |
| 35 | MOCK_METHOD0(UpdateConnected, void(void)); |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 36 | MOCK_METHOD2(EmitBoolChanged, void(const std::string&, bool)); |
| 37 | MOCK_METHOD2(EmitUintChanged, void(const std::string&, uint32)); |
| 38 | MOCK_METHOD2(EmitIntChanged, void(const std::string&, int)); |
| 39 | MOCK_METHOD2(EmitStringChanged, void(const std::string&, const std::string&)); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 40 | }; |
| 41 | |
| 42 | // These are the functions that a Device adaptor must support |
| 43 | class DeviceMockAdaptor : public DeviceAdaptorInterface { |
| 44 | public: |
| 45 | DeviceMockAdaptor() {} |
| 46 | virtual ~DeviceMockAdaptor() {} |
| 47 | MOCK_METHOD0(UpdateEnabled, void(void)); |
Chris Masone | d0ceb8c | 2011-06-02 10:05:39 -0700 | [diff] [blame] | 48 | MOCK_METHOD2(EmitBoolChanged, void(const std::string&, bool)); |
| 49 | MOCK_METHOD2(EmitUintChanged, void(const std::string&, uint32)); |
| 50 | MOCK_METHOD2(EmitIntChanged, void(const std::string&, int)); |
| 51 | MOCK_METHOD2(EmitStringChanged, void(const std::string&, const std::string&)); |
Chris Masone | d7732e4 | 2011-05-20 11:08:56 -0700 | [diff] [blame] | 52 | }; |
| 53 | |
| 54 | } // namespace shill |
| 55 | #endif // SHILL_MOCK_ADAPTORS_ |