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 <functional> 17 #include <gtest/gtest.h> 18 #include "reminder_agent_service_ability.h" 19 20 using namespace testing::ext; 21 22 namespace OHOS { 23 namespace Notification { 24 class ReminderAgentServiceAbilityTest : public testing::Test { 25 public: SetUpTestCase()26 static void SetUpTestCase() {}; TearDownTestCase()27 static void TearDownTestCase() {}; SetUp()28 void SetUp() {}; TearDown()29 void TearDown() {}; 30 }; 31 32 /** 33 * @tc.number : ReminderAgentServiceAbilityTest_00100 34 * @tc.name : ReminderAgentServiceAbility_0100 35 * @tc.desc : Structure ReminderAgentServiceAbility with systemAbilityId and runOnCreate 36 */ 37 HWTEST_F( 38 ReminderAgentServiceAbilityTest, ReminderAgentServiceAbilityTest_00100, Function | SmallTest | Level1) 39 { 40 int32_t systemAbilityId = 1; 41 bool runOnCreate = true; 42 ReminderAgentServiceAbility(systemAbilityId, runOnCreate); 43 } 44 45 /** 46 * @tc.number : ReminderAgentServiceAbilityTest_00200 47 * @tc.name : ReminderAgentServiceAbility_0200 48 * @tc.desc : Structure ReminderAgentServiceAbility with systemAbilityId and runOnCreate 49 */ 50 HWTEST_F( 51 ReminderAgentServiceAbilityTest, ReminderAgentServiceAbilityTest_00200, Function | SmallTest | Level1) 52 { 53 int32_t systemAbilityId = 1; 54 bool runOnCreate = true; 55 ReminderAgentServiceAbility test(systemAbilityId, runOnCreate); 56 test.OnStart(); 57 test.OnStart(); 58 } 59 60 /** 61 * @tc.number : ReminderAgentServiceAbilityTest_00300 62 * @tc.name : ReminderAgentServiceAbility_0300 63 * @tc.desc : Structure ReminderAgentServiceAbility with systemAbilityId and runOnCreate 64 */ 65 HWTEST_F( 66 ReminderAgentServiceAbilityTest, ReminderAgentServiceAbilityTest_00300, Function | SmallTest | Level1) 67 { 68 int32_t systemAbilityId = 1; 69 bool runOnCreate = true; 70 ReminderAgentServiceAbility test(systemAbilityId, runOnCreate); 71 test.OnStop(); 72 test.OnStart(); 73 } 74 } // namespace Notification 75 } // namespace OHOS 76