1 /*
2  * Copyright (C) 2019 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 MOCK_WIFI_IFACE_UTIL_H_
18 #define MOCK_WIFI_IFACE_UTIL_H_
19 
20 #include <gmock/gmock.h>
21 
22 #include "wifi_iface_util.h"
23 
24 namespace android {
25 namespace hardware {
26 namespace wifi {
27 namespace V1_4 {
28 namespace implementation {
29 namespace iface_util {
30 
31 class MockWifiIfaceUtil : public WifiIfaceUtil {
32    public:
33     MockWifiIfaceUtil(
34         const std::weak_ptr<wifi_system::InterfaceTool> iface_tool);
35     MOCK_METHOD1(getFactoryMacAddress,
36                  std::array<uint8_t, 6>(const std::string&));
37     MOCK_METHOD2(setMacAddress,
38                  bool(const std::string&, const std::array<uint8_t, 6>&));
39     MOCK_METHOD0(getOrCreateRandomMacAddress, std::array<uint8_t, 6>());
40     MOCK_METHOD2(registerIfaceEventHandlers,
41                  void(const std::string&, IfaceEventHandlers));
42     MOCK_METHOD1(unregisterIfaceEventHandlers, void(const std::string&));
43     MOCK_METHOD2(setUpState, bool(const std::string&, bool));
44     MOCK_METHOD1(ifNameToIndex, unsigned(const std::string&));
45 };
46 }  // namespace iface_util
47 }  // namespace implementation
48 }  // namespace V1_4
49 }  // namespace wifi
50 }  // namespace hardware
51 }  // namespace android
52 
53 #endif  // MOCK_WIFI_IFACE_UTIL_H_
54