blob: 1993dbbb38d6611c0b08e89398298681c567997d [file] [log] [blame]
Chris Masoned7732e42011-05-20 11:08:56 -07001// 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
14namespace shill {
15
16// These are the functions that a Manager adaptor must support
17class ManagerMockAdaptor : public ManagerAdaptorInterface {
18 public:
19 ManagerMockAdaptor() {}
20 virtual ~ManagerMockAdaptor() {}
21 MOCK_METHOD0(UpdateRunning, void(void));
Chris Masoned0ceb8c2011-06-02 10:05:39 -070022 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 Masoned7732e42011-05-20 11:08:56 -070028};
29
30// These are the functions that a Service adaptor must support
31class ServiceMockAdaptor : public ServiceAdaptorInterface {
32 public:
33 ServiceMockAdaptor() {}
34 virtual ~ServiceMockAdaptor() {}
35 MOCK_METHOD0(UpdateConnected, void(void));
Chris Masoned0ceb8c2011-06-02 10:05:39 -070036 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 Masoned7732e42011-05-20 11:08:56 -070040};
41
42// These are the functions that a Device adaptor must support
43class DeviceMockAdaptor : public DeviceAdaptorInterface {
44 public:
45 DeviceMockAdaptor() {}
46 virtual ~DeviceMockAdaptor() {}
47 MOCK_METHOD0(UpdateEnabled, void(void));
Chris Masoned0ceb8c2011-06-02 10:05:39 -070048 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 Masoned7732e42011-05-20 11:08:56 -070052};
53
54} // namespace shill
55#endif // SHILL_MOCK_ADAPTORS_