blob: 7d57148ef5c49d2f550f29e551efa9f24888077a [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
Ben Chanc54afe52014-11-05 10:28:08 -08005#ifndef SHILL_CELLULAR_MOCK_CELLULAR_H_
6#define SHILL_CELLULAR_MOCK_CELLULAR_H_
David Rochbergfa1d31d2012-03-20 10:38:07 -04007
8#include <string>
Jason Glasgow14521872012-05-07 19:12:15 -04009#include <vector>
David Rochbergfa1d31d2012-03-20 10:38:07 -040010
11#include <gmock/gmock.h>
12
Ben Chanc54afe52014-11-05 10:28:08 -080013#include "shill/cellular/cellular.h"
David Rochbergfa1d31d2012-03-20 10:38:07 -040014
15namespace shill {
16
17class MockCellular : public Cellular {
18 public:
Prathmesh Prabhu27526f12013-03-25 19:42:18 -070019 MockCellular(ModemInfo *modem_info,
David Rochbergfa1d31d2012-03-20 10:38:07 -040020 const std::string &link_name,
21 const std::string &address,
22 int interface_index,
23 Type type,
24 const std::string &owner,
Jason Glasgowa585fc32012-06-06 11:04:09 -040025 const std::string &service,
David Rochbergfa1d31d2012-03-20 10:38:07 -040026 const std::string &path,
Ben Chan3ecdf822012-08-06 12:29:23 -070027 ProxyFactory *proxy_factory);
Ben Chan5ea763b2014-08-13 11:07:54 -070028 ~MockCellular() override;
David Rochbergfa1d31d2012-03-20 10:38:07 -040029
Thieu Le398b1da2013-03-11 17:31:10 -070030 MOCK_METHOD1(Connect, void(Error *error));
Samuel Tan0d061192014-07-07 15:45:15 -070031 MOCK_METHOD2(Disconnect, void(Error *error, const char *reason));
Christopher Wiley7d0953e2012-11-16 00:37:10 -080032 MOCK_METHOD3(OnDBusPropertiesChanged, void(
33 const std::string &interface,
34 const DBusPropertiesMap &changed_properties,
35 const std::vector<std::string> &invalidated_properties));
36 MOCK_METHOD1(set_modem_state, void(ModemState state));
Darin Petkova0a0efe2012-06-27 12:50:01 +020037 MOCK_METHOD0(DestroyService, void());
mukesh agrawal83a98f42013-07-31 16:25:53 -070038 MOCK_METHOD1(StartPPP, void(const std::string &serial_device));
David Rochbergfa1d31d2012-03-20 10:38:07 -040039
40 private:
41 DISALLOW_COPY_AND_ASSIGN(MockCellular);
42};
43
44} // namespace shill
45
Ben Chanc54afe52014-11-05 10:28:08 -080046#endif // SHILL_CELLULAR_MOCK_CELLULAR_H_