diff --git a/services/samgr/native/test/unittest/src/system_ability_mgr_new_test.cpp b/services/samgr/native/test/unittest/src/system_ability_mgr_new_test.cpp index 7facca6b3f3f3d685a6bec0f39d6e135683d60f1..c925ccb44d119447d25d56ac8057db4ea523a1bb 100644 --- a/services/samgr/native/test/unittest/src/system_ability_mgr_new_test.cpp +++ b/services/samgr/native/test/unittest/src/system_ability_mgr_new_test.cpp @@ -492,56 +492,19 @@ HWTEST_F(SystemAbilityMgrTest, GetCommonEventExtraIdList001, TestSize.Level3) * @tc.require: I6NKWX */ HWTEST_F(SystemAbilityMgrTest, RemoveWhiteCommonEvent001, TestSize.Level3) -{ - sptr saMgr = new SystemAbilityManager; - InitSaMgr(saMgr); - saMgr->RemoveWhiteCommonEvent(); - EXPECT_TRUE(saMgr->collectManager_ != nullptr); -} - -/** - * @tc.name: CleanFfrt001 - * @tc.desc: test CleanFfrt, workHandler_ true. - * @tc.type: FUNC - * @tc.require: I6NKWX - */ -HWTEST_F(SystemAbilityMgrTest, CleanFfrt001, TestSize.Level3) { sptr saMgr = new SystemAbilityManager; saMgr->workHandler_ = make_shared("workHandler"); - int ret = true; saMgr->CleanFfrt(); - EXPECT_EQ(ret, true); -} - -/** - * @tc.name: CleanFfrt002 - * @tc.desc: test CleanFfrt, collectManager_ true. - * @tc.type: FUNC - * @tc.require: I6NKWX - */ -HWTEST_F(SystemAbilityMgrTest, CleanFfrt002, TestSize.Level3) -{ - sptr saMgr = new SystemAbilityManager; saMgr->collectManager_ = sptr(new DeviceStatusCollectManager()); - int ret = true; saMgr->CleanFfrt(); - EXPECT_EQ(ret, true); -} - -/** - * @tc.name: CleanFfrt003 - * @tc.desc: test CleanFfrt, abilityStateScheduler_ true. - * @tc.type: FUNC - * @tc.require: I6NKWX - */ -HWTEST_F(SystemAbilityMgrTest, CleanFfrt003, TestSize.Level3) -{ - sptr saMgr = new SystemAbilityManager; saMgr->abilityStateScheduler_ = std::make_shared(); - int ret = true; saMgr->CleanFfrt(); - EXPECT_EQ(ret, true); + InitSaMgr(saMgr); + const std::u16string name; + saMgr->NotifyRemoteSaDied(name); + saMgr->RemoveWhiteCommonEvent(); + EXPECT_TRUE(saMgr->collectManager_ != nullptr); } /** @@ -658,22 +621,6 @@ HWTEST_F(SystemAbilityMgrTest, RemoveSystemAbility005, TestSize.Level3) EXPECT_EQ(ret, ERR_INVALID_VALUE); } -/** - * @tc.name: NotifyRemoteSaDied002 - * @tc.desc: test NotifyRemoteSaDied, true. - * @tc.type: FUNC - * @tc.require: I6NKWX - */ -HWTEST_F(SystemAbilityMgrTest, NotifyRemoteSaDied002, TestSize.Level3) -{ - sptr saMgr = new SystemAbilityManager; - InitSaMgr(saMgr); - const std::u16string name; - int ret = true; - saMgr->NotifyRemoteSaDied(name); - EXPECT_EQ(ret, true); -} - /** * @tc.name: AddSystemAbility006 * @tc.desc: add system ability with empty capability. diff --git a/services/samgr/native/test/unittest/src/system_ability_mgr_util_test.cpp b/services/samgr/native/test/unittest/src/system_ability_mgr_util_test.cpp index 4b3c142a4ad95223fa8e80903aef1a71d83ba950..574f77e96ce4ffa17904d41d0dc6dde15eb07f87 100644 --- a/services/samgr/native/test/unittest/src/system_ability_mgr_util_test.cpp +++ b/services/samgr/native/test/unittest/src/system_ability_mgr_util_test.cpp @@ -323,32 +323,6 @@ HWTEST_F(SamgrUtilTest, GetCacheCommonEventSa001, TestSize.Level3) EXPECT_EQ(saList.size(), 2); } -/** - * @tc.name: SetModuleUpdateParam001 - * @tc.desc: test SetModuleUpdateParam with key and value is null - * @tc.type: FUNC - * @tc.require: I6V4AX - */ -HWTEST_F(SamgrUtilTest, SetModuleUpdateParam001, TestSize.Level3) -{ - std::string key = ""; - std::string value = ""; - SamgrUtil::SetModuleUpdateParam(key, value); -} - -/** - * @tc.name: SetModuleUpdateParam002 - * @tc.desc: test SetModuleUpdateParam with key and value is not null - * @tc.type: FUNC - * @tc.require: I6V4AX - */ -HWTEST_F(SamgrUtilTest, SetModuleUpdateParam002, TestSize.Level3) -{ - std::string key = "key"; - std::string value = "value"; - SamgrUtil::SetModuleUpdateParam(key, value); -} - /** * @tc.name: SendUpdateSaState001 * @tc.desc: test SendUpdateSaState @@ -357,6 +331,12 @@ HWTEST_F(SamgrUtilTest, SetModuleUpdateParam002, TestSize.Level3) */ HWTEST_F(SamgrUtilTest, SendUpdateSaState001, TestSize.Level3) { + std::string key = ""; + std::string value = ""; + SamgrUtil::SetModuleUpdateParam(key, value); + std::string key_a = "key"; + std::string value_a = "value"; + SamgrUtil::SetModuleUpdateParam(key_a, value_a); sptr saMgr = new SystemAbilityManager; EXPECT_NE(saMgr, nullptr); InitSaMgr(saMgr);