Home | History | Annotate | Download | only in wifi
      1 //
      2 // Copyright (C) 2013 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_WIFI_MOCK_WIFI_PROVIDER_H_
     18 #define SHILL_WIFI_MOCK_WIFI_PROVIDER_H_
     19 
     20 #include <gmock/gmock.h>
     21 
     22 #include "shill/wifi/wifi_endpoint.h"
     23 #include "shill/wifi/wifi_provider.h"
     24 
     25 namespace shill {
     26 
     27 class MockWiFiProvider : public WiFiProvider {
     28  public:
     29   MockWiFiProvider();
     30   ~MockWiFiProvider() override;
     31 
     32   MOCK_METHOD0(Start, void());
     33   MOCK_METHOD0(Stop, void());
     34   MOCK_METHOD1(CreateServicesFromProfile, void(const ProfileRefPtr& profile));
     35   MOCK_CONST_METHOD2(FindSimilarService,
     36                      ServiceRefPtr(const KeyValueStore& args,
     37                                    Error* error));
     38   MOCK_METHOD2(CreateTemporaryService,
     39                ServiceRefPtr(const KeyValueStore& args, Error* error));
     40   MOCK_METHOD2(GetService, ServiceRefPtr(const KeyValueStore& args,
     41                                          Error* error));
     42   MOCK_METHOD1(FindServiceForEndpoint,
     43                WiFiServiceRefPtr(const WiFiEndpointConstRefPtr& endpoint));
     44   MOCK_METHOD1(OnEndpointAdded, void(const WiFiEndpointConstRefPtr& endpoint));
     45   MOCK_METHOD1(OnEndpointRemoved,
     46                WiFiServiceRefPtr(const WiFiEndpointConstRefPtr& endpoint));
     47   MOCK_METHOD1(OnEndpointUpdated,
     48                void(const WiFiEndpointConstRefPtr& endpoint));
     49   MOCK_METHOD1(OnServiceUnloaded, bool(const WiFiServiceRefPtr& service));
     50   MOCK_METHOD0(GetHiddenSSIDList, ByteArrays());
     51   MOCK_METHOD1(LoadAndFixupServiceEntries, void(Profile* storage));
     52   MOCK_CONST_METHOD1(Save, bool(StoreInterface* storage));
     53   MOCK_METHOD1(IncrementConnectCount, void(uint16_t frequency));
     54   MOCK_METHOD0(NumAutoConnectableServices, int());
     55 
     56  private:
     57   DISALLOW_COPY_AND_ASSIGN(MockWiFiProvider);
     58 };
     59 
     60 }  // namespace shill
     61 
     62 #endif  // SHILL_WIFI_MOCK_WIFI_PROVIDER_H_
     63