blob: dfab61594bf2a771d296d78f39398f467cfd9c39 [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:
Paul Stewart2f6c7892015-06-16 13:13:10 -070019 MockCellular(ModemInfo* modem_info,
20 const std::string& link_name,
21 const std::string& address,
David Rochbergfa1d31d2012-03-20 10:38:07 -040022 int interface_index,
23 Type type,
Paul Stewart2f6c7892015-06-16 13:13:10 -070024 const std::string& service,
Peter Qiu608ec292015-07-30 15:46:16 -070025 const std::string& path);
Ben Chan5ea763b2014-08-13 11:07:54 -070026 ~MockCellular() override;
David Rochbergfa1d31d2012-03-20 10:38:07 -040027
Paul Stewart2f6c7892015-06-16 13:13:10 -070028 MOCK_METHOD1(Connect, void(Error* error));
29 MOCK_METHOD2(Disconnect, void(Error* error, const char* reason));
Peter Qiu05d87e32015-08-14 23:46:21 -070030 MOCK_METHOD3(OnPropertiesChanged, void(
Paul Stewart2f6c7892015-06-16 13:13:10 -070031 const std::string& interface,
Peter Qiu05d87e32015-08-14 23:46:21 -070032 const KeyValueStore& changed_properties,
Paul Stewart2f6c7892015-06-16 13:13:10 -070033 const std::vector<std::string>& invalidated_properties));
Christopher Wiley7d0953e2012-11-16 00:37:10 -080034 MOCK_METHOD1(set_modem_state, void(ModemState state));
Darin Petkova0a0efe2012-06-27 12:50:01 +020035 MOCK_METHOD0(DestroyService, void());
Paul Stewart2f6c7892015-06-16 13:13:10 -070036 MOCK_METHOD1(StartPPP, void(const std::string& serial_device));
David Rochbergfa1d31d2012-03-20 10:38:07 -040037
38 private:
39 DISALLOW_COPY_AND_ASSIGN(MockCellular);
40};
41
42} // namespace shill
43
Ben Chanc54afe52014-11-05 10:28:08 -080044#endif // SHILL_CELLULAR_MOCK_CELLULAR_H_