blob: 3f850f9f1eb8cc48426270ebd8da542cff1f254e [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,
Jason Glasgowa585fc32012-06-06 11:04:09 -040019 const std::string &service,
David Rochbergfa1d31d2012-03-20 10:38:07 -040020 const std::string &path,
21 ControlInterface *control_interface,
22 EventDispatcher *dispatcher,
23 Metrics *metrics,
24 Manager *manager,
25 mobile_provider_db *provider_db);
26 virtual ~MockModem();
27
28 // This class only mocks the pure virtual methods; if you need a
29 // more thorough mock, know that modem_unittest.cc depends on the
30 // incompleteness of this mock.
Eric Shienbrood7fce52c2012-04-13 19:11:02 -040031 MOCK_METHOD1(SetModemStateFromProperties,
32 void(const DBusPropertiesMap &properties));
David Rochbergfa1d31d2012-03-20 10:38:07 -040033 MOCK_CONST_METHOD2(GetLinkName,
34 bool(const DBusPropertiesMap &modem_properties,
35 std::string *name));
Jason Glasgow4c0724a2012-04-17 15:47:40 -040036 MOCK_CONST_METHOD0(GetModemInterface,
37 std::string(void));
David Rochbergfa1d31d2012-03-20 10:38:07 -040038 MOCK_METHOD3(ConstructCellular, Cellular *(
39 const std::string &link_name,
40 const std::string &device_name,
41 int ifindex));
42};
43typedef ::testing::StrictMock<MockModem> StrictModem;
44
45} // namespace shill
46
47#endif // SHILL_MOCK_MODEM_H_