From 6dc681fadf2ce2115ff6d93bb9ee87b7ae34cc37 Mon Sep 17 00:00:00 2001 From: xinking129 Date: Fri, 22 Mar 2024 15:33:55 +0800 Subject: [PATCH 1/3] add EmergencyInformation TDD Signed-off-by: xinking129 --- .../test/unittest/notification_flags_test.cpp | 67 +++++++++- .../unittest/notification_request_test.cpp | 17 ++- ...dvanced_notification_slot_service_test.cpp | 119 ++++++++++++++++++ 3 files changed, 201 insertions(+), 2 deletions(-) diff --git a/frameworks/ans/test/unittest/notification_flags_test.cpp b/frameworks/ans/test/unittest/notification_flags_test.cpp index ebcb1cc18..ac79bc316 100644 --- a/frameworks/ans/test/unittest/notification_flags_test.cpp +++ b/frameworks/ans/test/unittest/notification_flags_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Huawei Device Co., Ltd. + * Copyright (c) 2022-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -60,6 +60,71 @@ HWTEST_F(NotificationFlagsTest, SetVibrationEnabled_00001, Function | SmallTest EXPECT_EQ(rrc->IsVibrationEnabled(), vibrationEnabled); } +/** + * @tc.name: GetReminderFlags_00001 + * @tc.desc: Test GetReminderFlags parameters. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationFlagsTest, GetReminderFlags_00001, Function | SmallTest | Level1) +{ + auto rrc = std::make_shared(); + rrc->SetLockScreenVisblenessEnabled(true); + EXPECT_NE(rrc->GetReminderFlags(), 0); +} + +/** + * @tc.name: SetLockScreenVisblenessEnabled_00001 + * @tc.desc: Test SetLockScreenVisblenessEnabled parameters. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationFlagsTest, SetLockScreenVisblenessEnabled_00001, Function | SmallTest | Level1) +{ + auto rrc = std::make_shared(); + rrc->SetLockScreenVisblenessEnabled(true); + EXPECT_EQ(rrc->IsLockScreenVisblenessEnabled(), true); +} + +/** + * @tc.name: SetBannerEnabled_00001 + * @tc.desc: Test SetBannerEnabled parameters. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationFlagsTest, SetBannerEnabled_00001, Function | SmallTest | Level1) +{ + auto rrc = std::make_shared(); + rrc->SetBannerEnabled(true); + EXPECT_EQ(rrc->IsBannerEnabled(), true); +} + +/** + * @tc.name: SetLightScreenEnabled_00001 + * @tc.desc: Test SetLightScreenEnabled parameters. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationFlagsTest, SetLightScreenEnabled_00001, Function | SmallTest | Level1) +{ + auto rrc = std::make_shared(); + rrc->SetLightScreenEnabled(true); + EXPECT_EQ(rrc->IsLightScreenEnabled(), true); +} + +/** + * @tc.name: SetStatusIconEnabled_00001 + * @tc.desc: Test SetStatusIconEnabled parameters. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationFlagsTest, SetStatusIconEnabled_00001, Function | SmallTest | Level1) +{ + auto rrc = std::make_shared(); + rrc->SetStatusIconEnabled(true); + EXPECT_EQ(rrc->IsStatusIconEnabled(), true); +} + /** * @tc.name: Dump_00001 * @tc.desc: Test Dump parameters. diff --git a/frameworks/ans/test/unittest/notification_request_test.cpp b/frameworks/ans/test/unittest/notification_request_test.cpp index 00e841ced..f38cd2bc1 100644 --- a/frameworks/ans/test/unittest/notification_request_test.cpp +++ b/frameworks/ans/test/unittest/notification_request_test.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021-2022 Huawei Device Co., Ltd. + * Copyright (c) 2021-2024 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at @@ -961,6 +961,21 @@ HWTEST_F(NotificationRequestTest, GetNotificationRequestKey_0002, Level1) EXPECT_EQ(key, expectKey); } +/** + * @tc.name: SetNotificationControlFlags_0001 + * @tc.desc: Set notification control flags. + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(NotificationRequestTest, SetNotificationControlFlags_0001, Level1) +{ + int32_t myNotificationId = 10; + NotificationRequest notificationRequest(myNotificationId); + notificationRequest.SetNotificationControlFlags(1); + uint32_t flags = notificationRequest.GetNotificationControlFlags(); + EXPECT_EQ(flags, 1); +} + inline std::shared_ptr TestMakePixelMap(int32_t width, int32_t height) { const int32_t PIXEL_BYTES = 4; diff --git a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp index b546beabd..3d803a514 100644 --- a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp @@ -322,6 +322,125 @@ HWTEST_F(AnsSlotServiceTest, GetSlotFlagsAsBundle_00005, Function | SmallTest | EXPECT_EQ(flag, 1); } +/** + * @tc.name: SetNotificationFlagsForSocialCommunication_00001 + * @tc.desc: Test SetNotificationFlagsForSocialCommunication + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForSocialCommunication_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForSocialCommunication(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + +/** + * @tc.name: SetNotificationFlagsForServiceReminder_00001 + * @tc.desc: Test SetNotificationFlagsForServiceReminder + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForServiceReminder_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForServiceReminder(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + +/** + * @tc.name: SetNotificationFlagsForContentInformation_00001 + * @tc.desc: Test SetNotificationFlagsForContentInformation + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForContentInformation_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForContentInformation(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + +/** + * @tc.name: SetNotificationFlagsForLiveView_00001 + * @tc.desc: Test SetNotificationFlagsForLiveView + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForLiveView_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForLiveView(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + +/** + * @tc.name: SetNotificationFlagsForOther_00001 + * @tc.desc: Test SetNotificationFlagsForOther + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForOther_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(true); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForOther(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, false); +} + +/** + * @tc.name: SetNotificationFlagsForCustomService_00001 + * @tc.desc: Test SetNotificationFlagsForCustomService + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForCustomService_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForCustomService(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + +/** + * @tc.name: SetNotificationFlagsForEmergencyInformation_00001 + * @tc.desc: Test SetNotificationFlagsForEmergencyInformation + * @tc.type: FUNC + * @tc.require: issue I9AQ3T + */ +HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForEmergencyInformation_00001, Function | SmallTest | Level1) +{ + sptr request = new NotificationRequest(); + std::shared_ptr flags = std::make_shared(); + flags->SetStatusIconEnabled(false); + request->SetFlags(flags); + advancedNotificationService_->SetNotificationFlagsForEmergencyInformation(flags); + bool isEnabled = flags->IsStatusIconEnabled(); + EXPECT_EQ(isEnabled, true); +} + /** * @tc.name: SetRequestBySlotType_00001 * @tc.desc: Test SetRequestBySlotType -- Gitee From c293a7f8f43c6f650a29f8291e1cd27de1651ade Mon Sep 17 00:00:00 2001 From: xinking129 Date: Tue, 30 Apr 2024 14:30:27 +0800 Subject: [PATCH 2/3] change code Signed-off-by: xinking129 --- ...dvanced_notification_slot_service_test.cpp | 236 +++++++++--------- 1 file changed, 118 insertions(+), 118 deletions(-) diff --git a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp index 3d803a514..0b1518a5d 100644 --- a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp @@ -322,124 +322,124 @@ HWTEST_F(AnsSlotServiceTest, GetSlotFlagsAsBundle_00005, Function | SmallTest | EXPECT_EQ(flag, 1); } -/** - * @tc.name: SetNotificationFlagsForSocialCommunication_00001 - * @tc.desc: Test SetNotificationFlagsForSocialCommunication - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForSocialCommunication_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForSocialCommunication(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} - -/** - * @tc.name: SetNotificationFlagsForServiceReminder_00001 - * @tc.desc: Test SetNotificationFlagsForServiceReminder - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForServiceReminder_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForServiceReminder(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} - -/** - * @tc.name: SetNotificationFlagsForContentInformation_00001 - * @tc.desc: Test SetNotificationFlagsForContentInformation - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForContentInformation_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForContentInformation(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} - -/** - * @tc.name: SetNotificationFlagsForLiveView_00001 - * @tc.desc: Test SetNotificationFlagsForLiveView - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForLiveView_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForLiveView(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} - -/** - * @tc.name: SetNotificationFlagsForOther_00001 - * @tc.desc: Test SetNotificationFlagsForOther - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForOther_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(true); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForOther(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, false); -} - -/** - * @tc.name: SetNotificationFlagsForCustomService_00001 - * @tc.desc: Test SetNotificationFlagsForCustomService - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForCustomService_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForCustomService(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} - -/** - * @tc.name: SetNotificationFlagsForEmergencyInformation_00001 - * @tc.desc: Test SetNotificationFlagsForEmergencyInformation - * @tc.type: FUNC - * @tc.require: issue I9AQ3T - */ -HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForEmergencyInformation_00001, Function | SmallTest | Level1) -{ - sptr request = new NotificationRequest(); - std::shared_ptr flags = std::make_shared(); - flags->SetStatusIconEnabled(false); - request->SetFlags(flags); - advancedNotificationService_->SetNotificationFlagsForEmergencyInformation(flags); - bool isEnabled = flags->IsStatusIconEnabled(); - EXPECT_EQ(isEnabled, true); -} +// /** +// * @tc.name: SetNotificationFlagsForSocialCommunication_00001 +// * @tc.desc: Test SetNotificationFlagsForSocialCommunication +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForSocialCommunication_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForSocialCommunication(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } + +// /** +// * @tc.name: SetNotificationFlagsForServiceReminder_00001 +// * @tc.desc: Test SetNotificationFlagsForServiceReminder +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForServiceReminder_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForServiceReminder(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } + +// /** +// * @tc.name: SetNotificationFlagsForContentInformation_00001 +// * @tc.desc: Test SetNotificationFlagsForContentInformation +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForContentInformation_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForContentInformation(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } + +// /** +// * @tc.name: SetNotificationFlagsForLiveView_00001 +// * @tc.desc: Test SetNotificationFlagsForLiveView +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForLiveView_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForLiveView(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } + +// /** +// * @tc.name: SetNotificationFlagsForOther_00001 +// * @tc.desc: Test SetNotificationFlagsForOther +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForOther_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(true); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForOther(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, false); +// } + +// /** +// * @tc.name: SetNotificationFlagsForCustomService_00001 +// * @tc.desc: Test SetNotificationFlagsForCustomService +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForCustomService_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForCustomService(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } + +// /** +// * @tc.name: SetNotificationFlagsForEmergencyInformation_00001 +// * @tc.desc: Test SetNotificationFlagsForEmergencyInformation +// * @tc.type: FUNC +// * @tc.require: issue I9AQ3T +// */ +// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForEmergencyInformation_00001, Function | SmallTest | Level1) +// { +// sptr request = new NotificationRequest(); +// std::shared_ptr flags = std::make_shared(); +// flags->SetStatusIconEnabled(false); +// request->SetFlags(flags); +// advancedNotificationService_->SetNotificationFlagsForEmergencyInformation(flags); +// bool isEnabled = flags->IsStatusIconEnabled(); +// EXPECT_EQ(isEnabled, true); +// } /** * @tc.name: SetRequestBySlotType_00001 -- Gitee From 71f2fcd184f5236f25c06636f37f485100826e83 Mon Sep 17 00:00:00 2001 From: xinking129 Date: Tue, 30 Apr 2024 15:37:35 +0800 Subject: [PATCH 3/3] fix code Signed-off-by: xinking129 --- ...dvanced_notification_slot_service_test.cpp | 119 ------------------ 1 file changed, 119 deletions(-) diff --git a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp index 0b1518a5d..b546beabd 100644 --- a/services/ans/test/unittest/advanced_notification_slot_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_slot_service_test.cpp @@ -322,125 +322,6 @@ HWTEST_F(AnsSlotServiceTest, GetSlotFlagsAsBundle_00005, Function | SmallTest | EXPECT_EQ(flag, 1); } -// /** -// * @tc.name: SetNotificationFlagsForSocialCommunication_00001 -// * @tc.desc: Test SetNotificationFlagsForSocialCommunication -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForSocialCommunication_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForSocialCommunication(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - -// /** -// * @tc.name: SetNotificationFlagsForServiceReminder_00001 -// * @tc.desc: Test SetNotificationFlagsForServiceReminder -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForServiceReminder_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForServiceReminder(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - -// /** -// * @tc.name: SetNotificationFlagsForContentInformation_00001 -// * @tc.desc: Test SetNotificationFlagsForContentInformation -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForContentInformation_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForContentInformation(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - -// /** -// * @tc.name: SetNotificationFlagsForLiveView_00001 -// * @tc.desc: Test SetNotificationFlagsForLiveView -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForLiveView_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForLiveView(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - -// /** -// * @tc.name: SetNotificationFlagsForOther_00001 -// * @tc.desc: Test SetNotificationFlagsForOther -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForOther_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(true); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForOther(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, false); -// } - -// /** -// * @tc.name: SetNotificationFlagsForCustomService_00001 -// * @tc.desc: Test SetNotificationFlagsForCustomService -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForCustomService_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForCustomService(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - -// /** -// * @tc.name: SetNotificationFlagsForEmergencyInformation_00001 -// * @tc.desc: Test SetNotificationFlagsForEmergencyInformation -// * @tc.type: FUNC -// * @tc.require: issue I9AQ3T -// */ -// HWTEST_F(AnsSlotServiceTest, SetNotificationFlagsForEmergencyInformation_00001, Function | SmallTest | Level1) -// { -// sptr request = new NotificationRequest(); -// std::shared_ptr flags = std::make_shared(); -// flags->SetStatusIconEnabled(false); -// request->SetFlags(flags); -// advancedNotificationService_->SetNotificationFlagsForEmergencyInformation(flags); -// bool isEnabled = flags->IsStatusIconEnabled(); -// EXPECT_EQ(isEnabled, true); -// } - /** * @tc.name: SetRequestBySlotType_00001 * @tc.desc: Test SetRequestBySlotType -- Gitee