From dbcb91a5bf784a1d1844955d30ff1de422639fc0 Mon Sep 17 00:00:00 2001 From: wangdi Date: Fri, 15 Aug 2025 16:06:01 +0800 Subject: [PATCH] fix tdd Signed-off-by: wangdi --- ...ation_distributed_manager_service_test.cpp | 35 ------------------- 1 file changed, 35 deletions(-) diff --git a/services/ans/test/unittest/advanced_notification_service_test/advanced_notification_distributed_manager_service_test.cpp b/services/ans/test/unittest/advanced_notification_service_test/advanced_notification_distributed_manager_service_test.cpp index f62ee9e3f..0f155723b 100644 --- a/services/ans/test/unittest/advanced_notification_service_test/advanced_notification_distributed_manager_service_test.cpp +++ b/services/ans/test/unittest/advanced_notification_service_test/advanced_notification_distributed_manager_service_test.cpp @@ -889,40 +889,5 @@ HWTEST_F(AdvancedNotificationDistMgrServiceTest, GetDistributedDevicelist_0100, auto ret = advancedNotificationService_->GetDistributedDevicelist(deviceTypes); ASSERT_EQ(ret, (int)ERR_ANS_NON_SYSTEM_APP); } - -/** - * @tc.name: GetDistributedDevicelist_0200 - * @tc.desc: Test GetDistributedDevicelist. - * @tc.type: FUNC - */ -HWTEST_F(AdvancedNotificationDistMgrServiceTest, GetDistributedDevicelist_0200, Function | SmallTest | Level1) -{ - MockGetTokenTypeFlag(ATokenTypeEnum::TOKEN_HAP); - MockIsSystemApp(true); - std::vector deviceTypes; - auto ret = advancedNotificationService_->GetDistributedDevicelist(deviceTypes); - ASSERT_EQ(ret, (int)ERR_OK); -} - -/** - * @tc.name: GetDistributedDevicelist_0300 - * @tc.desc: Test GetDistributedDevicelist. - * @tc.type: FUNC - */ -HWTEST_F(AdvancedNotificationDistMgrServiceTest, GetDistributedDevicelist_0300, Function | SmallTest | Level1) -{ - MockGetTokenTypeFlag(ATokenTypeEnum::TOKEN_HAP); - MockIsSystemApp(true); - const std::string deviceType = "testDeviceType"; - const std::string deviceId = "testDeviceId"; - int32_t userId = 100; - bool isAuth = true; - auto ret = advancedNotificationService_->SetDistributedAuthStatus(deviceType, deviceId, userId, isAuth); - ASSERT_EQ(ret, (int)ERR_OK); - std::vector deviceTypes; - ret = advancedNotificationService_->GetDistributedDevicelist(deviceTypes); - ASSERT_EQ(ret, (int)ERR_OK); - ASSERT_NE(deviceTypes.size(), 0); -} } // namespace Notification } // namespace OHOS -- Gitee