Home | History | Annotate | Download | only in cellular
      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_CELLULAR_MOCK_CELLULAR_H_
     18 #define SHILL_CELLULAR_MOCK_CELLULAR_H_
     19 
     20 #include <string>
     21 #include <vector>
     22 
     23 #include <gmock/gmock.h>
     24 
     25 #include "shill/cellular/cellular.h"
     26 
     27 namespace shill {
     28 
     29 class MockCellular : public Cellular {
     30  public:
     31   MockCellular(ModemInfo* modem_info,
     32                const std::string& link_name,
     33                const std::string& address,
     34                int interface_index,
     35                Type type,
     36                const std::string& service,
     37                const std::string& path);
     38   ~MockCellular() override;
     39 
     40   MOCK_METHOD1(Connect, void(Error* error));
     41   MOCK_METHOD2(Disconnect, void(Error* error, const char* reason));
     42   MOCK_METHOD3(OnPropertiesChanged, void(
     43       const std::string& interface,
     44       const KeyValueStore& changed_properties,
     45       const std::vector<std::string>& invalidated_properties));
     46   MOCK_METHOD1(set_modem_state, void(ModemState state));
     47   MOCK_METHOD0(DestroyService, void());
     48   MOCK_METHOD1(StartPPP, void(const std::string& serial_device));
     49 
     50  private:
     51   DISALLOW_COPY_AND_ASSIGN(MockCellular);
     52 };
     53 
     54 }  // namespace shill
     55 
     56 #endif  // SHILL_CELLULAR_MOCK_CELLULAR_H_
     57