1 /* 2 * Copyright (C) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef NETSYS_MAIN_TEST_H__ 17 #define NETSYS_MAIN_TEST_H__ 18 #include <cstdint> 19 #include <iostream> 20 #include <map> 21 #include "i_netsys_service.h" 22 #include "test_notify_callback.h" 23 24 using NetsysTestFunc = void (*)(); 25 26 void TestSetResolverConfig(void); 27 void TestCreateNetworkCache(void); 28 void TestFlushNetworkCache(void); 29 void TestDestroyNetworkCache(void); 30 void TestInterfaceSetMtu(void); 31 void TestInterfaceGetMtu(void); 32 void TestRegisterNotifyCallback(void); 33 void TestNetworkAddRoute(void); 34 void TestNetworkRemoveRoute(void); 35 void TestNetworkAddRouteParcel(void); 36 void TestNetWorkRemoveRouteParcel(void); 37 void TestNetworkSetDefault(void); 38 void TestNetworkGetDefault(void); 39 void TestNetworkCreatePhysical(void); 40 void TestInterfaceAddAddress(void); 41 void TestInterfaceDelAddress(void); 42 void TestNetworkAddInterface(void); 43 void TestNetworkRemoveInterface(void); 44 void TestGetFwmarkForNetwork(void); 45 void TestInterfaceSetCfg(void); 46 void TestNetworkClearDefault(void); 47 void TestNetGetProcSysNet(void); 48 void TestInterfaceGetCfg(void); 49 void TestGetResolverConfig(void); 50 void TestNetworkGetDefaultUnion(void); 51 52 void TestNetworkSetDefaultWIFI(void); 53 void TestNetworkAddInterfaceWIFI(void); 54 void TestNetworkRemoveInterfaceWIFI(void); 55 56 57 #endif // !NETSYS_MAIN_TEST_H__ 58