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 #include <gtest/gtest.h> 17 #include "print_sync_load_callback.h" 18 #include "iservice_registry.h" 19 #include "isystem_ability_load_callback.h" 20 #include "print_log.h" 21 #include "print_manager_client.h" 22 #include "system_ability_definition.h" 23 24 using namespace testing::ext; 25 26 namespace OHOS { 27 namespace Print { 28 class PrintSyncLoadCallbackTest : public testing::Test { 29 public: 30 static void SetUpTestCase(void); 31 static void TearDownTestCase(void); 32 void SetUp(); 33 void TearDown(); 34 }; 35 SetUpTestCase(void)36void PrintSyncLoadCallbackTest::SetUpTestCase(void) {} 37 TearDownTestCase(void)38void PrintSyncLoadCallbackTest::TearDownTestCase(void) {} 39 SetUp(void)40void PrintSyncLoadCallbackTest::SetUp(void) {} 41 TearDown(void)42void PrintSyncLoadCallbackTest::TearDown(void) {} 43 44 /** 45 * @tc.name: PrintSyncLoadCallbackTest_0001 46 * @tc.desc: Verify the capability function. 47 * @tc.type: FUNC 48 * @tc.require: 49 */ 50 HWTEST_F(PrintSyncLoadCallbackTest, PrintSyncLoadCallbackTest_0001, TestSize.Level1) 51 { 52 OHOS::Print::PrintSyncLoadCallback printSyncLoadCallback; 53 int32_t systemAbilityId = 0; 54 const sptr<IRemoteObject> remoteObject; 55 printSyncLoadCallback.OnLoadSystemAbilitySuccess(systemAbilityId, remoteObject); 56 printSyncLoadCallback.OnLoadSystemAbilityFail(systemAbilityId); 57 } 58 } // namespace Print 59 } // namespace OHOS