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 STATE_REGISTER_TEST_H 17 #define STATE_REGISTER_TEST_H 18 19 #include <iostream> 20 #include <securec.h> 21 22 #include "gtest/gtest.h" 23 24 #include "if_system_ability_manager.h" 25 26 #include "iservice_registry.h" 27 28 #include "system_ability_definition.h" 29 30 #include "string_ex.h" 31 32 #include "i_telephony_state_notify.h" 33 #include "state_registry_errors.h" 34 35 namespace OHOS { 36 namespace Telephony { 37 using namespace testing::ext; 38 class StateRegistryTest : public testing::Test { 39 public: 40 static void SetUpTestCase(); 41 static void TearDownTestCase(); 42 void SetUp(); 43 void TearDown(); 44 void CreateProxy(); 45 46 void UpdateCallState(); 47 void UpdateCallStateForSlotId(); 48 void UpdateSignalInfo(); 49 void UpdateCellularDataConnectState(); 50 void UpdateCellularDataFlow(); 51 void UpdateSimState(); 52 void UpdateNetworkState(); 53 54 public: 55 using RequestFuncType = void (StateRegistryTest::*)(); 56 std::map<char, RequestFuncType> requestFuncMap_; 57 }; 58 } // namespace Telephony 59 } // namespace OHOS 60 #endif // STATE_REGISTER_TEST_H