1 // 2 // Copyright (C) 2012 The Android Open Source Project 3 // 4 // Licensed under the Apache License, Version 2.0 (the "License"); 5 // you may not use this file except in compliance with the License. 6 // You may obtain a copy of the License at 7 // 8 // http://www.apache.org/licenses/LICENSE-2.0 9 // 10 // Unless required by applicable law or agreed to in writing, software 11 // distributed under the License is distributed on an "AS IS" BASIS, 12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 // See the License for the specific language governing permissions and 14 // limitations under the License. 15 // 16 17 #ifndef SHILL_WIMAX_MOCK_WIMAX_H_ 18 #define SHILL_WIMAX_MOCK_WIMAX_H_ 19 20 #include <string> 21 22 #include <gmock/gmock.h> 23 24 #include "shill/wimax/wimax.h" 25 26 namespace shill { 27 28 class ControlInterface; 29 class Error; 30 class EventDispatcher; 31 32 class MockWiMax : public WiMax { 33 public: 34 MockWiMax(ControlInterface* control, 35 EventDispatcher* dispatcher, 36 Metrics* metrics, 37 Manager* manager, 38 const std::string& link_name, 39 const std::string& address, 40 int interface_index, 41 const RpcIdentifier& path); 42 ~MockWiMax() override; 43 44 MOCK_METHOD2(Start, void(Error* error, 45 const EnabledStateChangedCallback& callback)); 46 MOCK_METHOD2(Stop, void(Error* error, 47 const EnabledStateChangedCallback& callback)); 48 MOCK_METHOD2(ConnectTo, void(const WiMaxServiceRefPtr& service, 49 Error* error)); 50 MOCK_METHOD2(DisconnectFrom, void(const ServiceRefPtr& service, 51 Error* error)); 52 MOCK_CONST_METHOD0(IsIdle, bool()); 53 MOCK_METHOD1(OnServiceStopped, void(const WiMaxServiceRefPtr& service)); 54 MOCK_METHOD0(OnDeviceVanished, void()); 55 56 private: 57 DISALLOW_COPY_AND_ASSIGN(MockWiMax); 58 }; 59 60 } // namespace shill 61 62 #endif // SHILL_WIMAX_MOCK_WIMAX_H_ 63