blob: bb358474b753df441e163f4f9225e6ede5e05d07 [file] [log] [blame]
David Rochbergfa1d31d2012-03-20 10:38:07 -04001// Copyright (c) 2012 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_MODEM_H_
6#define SHILL_MOCK_MODEM_H_ 1
7
8#include <string>
9
10#include <gmock/gmock.h>
11
12#include "shill/modem.h"
13
14namespace shill {
15
16class MockModem : public Modem {
17 public:
18 MockModem(const std::string &owner,
19 const std::string &path,
20 ControlInterface *control_interface,
21 EventDispatcher *dispatcher,
22 Metrics *metrics,
23 Manager *manager,
24 mobile_provider_db *provider_db);
25 virtual ~MockModem();
26
27 // This class only mocks the pure virtual methods; if you need a
28 // more thorough mock, know that modem_unittest.cc depends on the
29 // incompleteness of this mock.
30 MOCK_CONST_METHOD1(ConvertMmToCellularModemState,
31 Cellular::ModemState(uint32 state));
32 MOCK_CONST_METHOD2(GetLinkName,
33 bool(const DBusPropertiesMap &modem_properties,
34 std::string *name));
35 MOCK_METHOD3(ConstructCellular, Cellular *(
36 const std::string &link_name,
37 const std::string &device_name,
38 int ifindex));
39};
40typedef ::testing::StrictMock<MockModem> StrictModem;
41
42} // namespace shill
43
44#endif // SHILL_MOCK_MODEM_H_