From d5abfafa92b1ccfe2f1b79c788de0965122d7a9a Mon Sep 17 00:00:00 2001 From: xuezhongzhu Date: Wed, 14 Sep 2022 17:52:50 +0800 Subject: [PATCH] =?UTF-8?q?IssueNo:https://gitee.com/openharmony/notificat?= =?UTF-8?q?ion=5Fdistributed=5Fnotification=5Fservice/issues/I5R30Z=20Desc?= =?UTF-8?q?ription:=E5=88=86=E6=94=AF=E8=A6=86=E7=9B=96=E7=8E=87=20Sig:SIG?= =?UTF-8?q?=5FApplicationFramework=20Feature=20or=20Bugfix:Bugfix=20Binary?= =?UTF-8?q?=20Source:=20No?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: xuezhongzhu Change-Id: Ie3a7c54494c4bf409b3e4d188c658fe1334d8e13 --- .../unittest/reminder_request_timer_test.cpp | 58 +++++++++++++++++++ .../ans_innerkits_module_publish_test.cpp | 2 +- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/frameworks/ans/test/unittest/reminder_request_timer_test.cpp b/frameworks/ans/test/unittest/reminder_request_timer_test.cpp index 1a6e8c8a3..fe539a7e3 100644 --- a/frameworks/ans/test/unittest/reminder_request_timer_test.cpp +++ b/frameworks/ans/test/unittest/reminder_request_timer_test.cpp @@ -56,5 +56,63 @@ HWTEST_F(ReminderRequestTimerTest, initCountDownTime_00100, Function | SmallTest auto rrc3 = std::make_shared(countDownTimeInSeconds); EXPECT_TRUE(rrc3->GetInitInfo() == 100) << "countDownTime is not 1"; } + +/** + * @tc.number : ANS_OnDateTimeChange_01000 + * @tc.name : OnDateTimeChange01000 + * @tc.type : FUNC + * @tc.require : issueI5R30Z + */ +HWTEST_F(ReminderRequestTimerTest, OnDateTimeChange_00100, Function | SmallTest | Level1) +{ + uint64_t countDownTimeInSeconds = 1; + auto rrc = std::make_shared(countDownTimeInSeconds); + auto result = rrc->OnDateTimeChange(); + EXPECT_EQ(result, false); +} + +/** + * @tc.number : ANS_OnTimeZoneChange_01000 + * @tc.name : OnTimeZoneChange01000 + * @tc.type : FUNC + * @tc.require : issueI5R30Z + */ +HWTEST_F(ReminderRequestTimerTest, OnTimeZoneChange_00100, Function | SmallTest | Level1) +{ + uint64_t countDownTimeInSeconds = 1; + auto rrc = std::make_shared(countDownTimeInSeconds); + auto result = rrc->OnTimeZoneChange(); + EXPECT_EQ(result, false); +} + +/** + * @tc.number : ANS_Marshalling_01000 + * @tc.name : Marshalling01000 + * @tc.type : FUNC + * @tc.require : issueI5R30Z + */ +HWTEST_F(ReminderRequestTimerTest, Marshalling_00100, Function | SmallTest | Level1) +{ + uint64_t countDownTimeInSeconds = 1; + Parcel parcel; + auto rrc = std::make_shared(countDownTimeInSeconds); + auto result = rrc->Marshalling(parcel); + EXPECT_EQ(result, true); +} + +/** + * @tc.number : ANS_ReadFromParcel_01000 + * @tc.name : ReadFromParcel01000 + * @tc.type : FUNC + * @tc.require : issueI5R30Z + */ +HWTEST_F(ReminderRequestTimerTest, ReadFromParcel_00100, Function | SmallTest | Level1) +{ + uint64_t countDownTimeInSeconds = 1; + Parcel parcel; + auto rrc = std::make_shared(countDownTimeInSeconds); + auto result = rrc->ReadFromParcel(parcel); + EXPECT_EQ(result, false); +} } } \ No newline at end of file diff --git a/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp index 0befae437..a9e2e45a4 100644 --- a/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp +++ b/frameworks/test/moduletest/ans_innerkits_module_publish_test.cpp @@ -1588,4 +1588,4 @@ HWTEST_F(AnsInnerKitsModulePublishTest, ANS_Interface_MT_Publish_09000, Function WaitOnUnsubscribeResult(); } } // namespace Notification -} // namespace OHOS \ No newline at end of file +} // namespace OHOS -- Gitee