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 #include "shill/wifi/mock_scan_session.h"
18 
19 #include <gmock/gmock.h>
20 
21 #include "shill/wifi/wifi_provider.h"
22 
23 namespace shill {
24 
MockScanSession(NetlinkManager * netlink_manager,EventDispatcher * dispatcher,const WiFiProvider::FrequencyCountList & previous_frequencies,const std::set<uint16_t> & available_frequencies,uint32_t ifindex,const FractionList & fractions,int min_frequencies,int max_frequencies,OnScanFailed on_scan_failed,Metrics * metrics)25 MockScanSession::MockScanSession(NetlinkManager* netlink_manager,
26                                  EventDispatcher* dispatcher,
27                                  const WiFiProvider::FrequencyCountList
28                                      &previous_frequencies,
29                                  const std::set<uint16_t>
30                                      &available_frequencies,
31                                  uint32_t ifindex,
32                                  const FractionList& fractions,
33                                  int min_frequencies,
34                                  int max_frequencies,
35                                  OnScanFailed on_scan_failed,
36                                  Metrics* metrics)
37     : ScanSession(netlink_manager,
38                   dispatcher,
39                   previous_frequencies,
40                   available_frequencies,
41                   ifindex,
42                   fractions,
43                   min_frequencies,
44                   max_frequencies,
45                   on_scan_failed,
46                   metrics) {
47   ON_CALL(*this, HasMoreFrequencies()).WillByDefault(testing::Return(true));
48 }
49 
~MockScanSession()50 MockScanSession::~MockScanSession() {}
51 
52 
53 }  // namespace shill
54