1 /* 2 * Copyright (c) 2023 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 #include <gtest/gtest.h> 17 18 #define private public 19 #include "ability_manager_client.h" 20 #include "driver_extension_context.h" 21 #undef private 22 23 #include "ability_connection.h" 24 25 using namespace testing::ext; 26 using namespace OHOS::AppExecFwk; 27 28 namespace OHOS { 29 namespace AbilityRuntime { 30 class DriverExtensionContextTest : public testing::Test { 31 public: 32 static void SetUpTestCase(void); 33 static void TearDownTestCase(void); 34 void SetUp(); 35 void TearDown(); 36 }; 37 SetUpTestCase(void)38void DriverExtensionContextTest::SetUpTestCase(void) 39 {} TearDownTestCase(void)40void DriverExtensionContextTest::TearDownTestCase(void) 41 {} SetUp(void)42void DriverExtensionContextTest::SetUp(void) 43 {} TearDown(void)44void DriverExtensionContextTest::TearDown(void) 45 {} 46 47 /* 48 * Feature: DriverExtensionContext 49 * Function: UpdateDriverState 50 * SubFunction: NA 51 * FunctionPoints: DriverExtensionContextTest UpdateDriverState 52 * EnvConditions: NA 53 * CaseDescription: Verify UpdateDriverState 54 */ 55 HWTEST_F(DriverExtensionContextTest, SUB_DriverSystem_DriverExtensionContext_0010, TestSize.Level1) 56 { 57 DriverExtensionContext driverExtensionContextTest; 58 ErrCode result = driverExtensionContextTest.UpdateDriverState(); 59 EXPECT_EQ(ERR_OK, result); 60 } 61 } 62 }