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: |
Prathmesh Prabhu | 27526f1 | 2013-03-25 19:42:18 -0700 | [diff] [blame] | 19 | MockCellular(ModemInfo *modem_info, |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 20 | const std::string &link_name, |
| 21 | const std::string &address, |
| 22 | int interface_index, |
| 23 | Type type, |
| 24 | const std::string &owner, |
Jason Glasgow | a585fc3 | 2012-06-06 11:04:09 -0400 | [diff] [blame] | 25 | const std::string &service, |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 26 | const std::string &path, |
Ben Chan | 3ecdf82 | 2012-08-06 12:29:23 -0700 | [diff] [blame] | 27 | ProxyFactory *proxy_factory); |
Ben Chan | 5ea763b | 2014-08-13 11:07:54 -0700 | [diff] [blame] | 28 | ~MockCellular() override; |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 29 | |
Thieu Le | 398b1da | 2013-03-11 17:31:10 -0700 | [diff] [blame] | 30 | MOCK_METHOD1(Connect, void(Error *error)); |
Samuel Tan | 0d06119 | 2014-07-07 15:45:15 -0700 | [diff] [blame] | 31 | MOCK_METHOD2(Disconnect, void(Error *error, const char *reason)); |
Christopher Wiley | 7d0953e | 2012-11-16 00:37:10 -0800 | [diff] [blame] | 32 | 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 Petkov | a0a0efe | 2012-06-27 12:50:01 +0200 | [diff] [blame] | 37 | MOCK_METHOD0(DestroyService, void()); |
mukesh agrawal | 83a98f4 | 2013-07-31 16:25:53 -0700 | [diff] [blame] | 38 | MOCK_METHOD1(StartPPP, void(const std::string &serial_device)); |
David Rochberg | fa1d31d | 2012-03-20 10:38:07 -0400 | [diff] [blame] | 39 | |
| 40 | private: |
| 41 | DISALLOW_COPY_AND_ASSIGN(MockCellular); |
| 42 | }; |
| 43 | |
| 44 | } // namespace shill |
| 45 | |
Ben Chan | c54afe5 | 2014-11-05 10:28:08 -0800 | [diff] [blame] | 46 | #endif // SHILL_CELLULAR_MOCK_CELLULAR_H_ |