Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -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_SERVICE_ |
| 6 | #define SHILL_MOCK_SERVICE_ |
| 7 | |
| 8 | #include <base/memory/ref_counted.h> |
| 9 | #include <gmock/gmock.h> |
| 10 | |
| 11 | #include "shill/service.h" |
| 12 | |
| 13 | namespace shill { |
| 14 | |
| 15 | class ControlInterface; |
| 16 | class EventDispatcher; |
| 17 | |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 18 | class MockService : public Service { |
| 19 | public: |
| 20 | // A constructor for the Service object |
| 21 | MockService(ControlInterface *control_interface, |
| 22 | EventDispatcher *dispatcher, |
Chris Masone | c1e5041 | 2011-06-07 13:04:53 -0700 | [diff] [blame] | 23 | DeviceConfigInterfaceRefPtr interface, |
Chris Masone | a82b711 | 2011-05-25 15:16:29 -0700 | [diff] [blame] | 24 | const std::string& name); |
| 25 | virtual ~MockService(); |
Chris Masone | 9be4a9d | 2011-05-16 15:44:09 -0700 | [diff] [blame] | 26 | |
| 27 | MOCK_METHOD0(Connect, void(void)); |
| 28 | MOCK_METHOD0(Disconnect, void(void)); |
| 29 | |
| 30 | private: |
| 31 | DISALLOW_COPY_AND_ASSIGN(MockService); |
| 32 | }; |
| 33 | |
| 34 | } // namespace shill |
| 35 | |
| 36 | #endif // SHILL_MOCK_SERVICE_ |