David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 1 | // 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 Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 5 | #ifndef SHILL_CELLULAR_MOCK_CELLULAR_H_ |
| 6 | #define SHILL_CELLULAR_MOCK_CELLULAR_H_ |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 7 | |
| 8 | #include <string> |
Jason Glasgow | 1452187 | 2012-05-07 19:12:15 -0400 | [diff] [blame] | 9 | #include <vector> |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 10 | |
| 11 | #include <gmock/gmock.h> |
| 12 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 13 | #include "shill/cellular/cellular.h" |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 14 | |
| 15 | namespace shill { |
| 16 | |
| 17 | class MockCellular : public Cellular { |
| 18 | public: |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 19 | MockCellular(ModemInfo* modem_info, |
| 20 | const std::string& link_name, |
| 21 | const std::string& address, |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 22 | int interface_index, |
| 23 | Type type, |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 24 | const std::string& owner, |
| 25 | const std::string& service, |
Peter Qiu | 608ec29 | 2015-07-30 15:46:16 -0700 | [diff] [blame^] | 26 | const std::string& path); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 27 | ~MockCellular() override; |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 28 | |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 29 | MOCK_METHOD1(Connect, void(Error* error)); |
| 30 | MOCK_METHOD2(Disconnect, void(Error* error, const char* reason)); |
Christopher Wiley | 7d0953e | 2012-11-16 00:37:10 -0800 | [diff] [blame] | 31 | MOCK_METHOD3(OnDBusPropertiesChanged, void( |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 32 | const std::string& interface, |
| 33 | const DBusPropertiesMap& changed_properties, |
| 34 | const std::vector<std::string>& invalidated_properties)); |
Christopher Wiley | 7d0953e | 2012-11-16 00:37:10 -0800 | [diff] [blame] | 35 | MOCK_METHOD1(set_modem_state, void(ModemState state)); |
Darin Petkov | a0a0efe | 2012-06-27 12:50:01 +0200 | [diff] [blame] | 36 | MOCK_METHOD0(DestroyService, void()); |
Paul Stewart | 2f6c789 | 2015-06-16 13:13:10 -0700 | [diff] [blame] | 37 | MOCK_METHOD1(StartPPP, void(const std::string& serial_device)); |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 38 | |
| 39 | private: |
| 40 | DISALLOW_COPY_AND_ASSIGN(MockCellular); |
| 41 | }; |
| 42 | |
| 43 | } // namespace shill |
| 44 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 45 | #endif // SHILL_CELLULAR_MOCK_CELLULAR_H_ |