mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
codecheck and UT
Signed-off-by: MisterE <smart_e@126.com>
This commit is contained in:
commit
98d74d5fb6
@ -367,8 +367,8 @@ int32_t DMSContinueRecvMgr::DealOnBroadcastBusiness(const std::string& senderNet
|
||||
return ERR_OK;
|
||||
}
|
||||
|
||||
bool DMSContinueRecvMgr::IsBundleContinuable(const AppExecFwk::BundleInfo& bundleInfo, const std::string &srcAbilityName,
|
||||
const std::string &srcContinueType, bool isSameBundle)
|
||||
bool DMSContinueRecvMgr::IsBundleContinuable(const AppExecFwk::BundleInfo& bundleInfo,
|
||||
const std::string &srcAbilityName, const std::string &srcContinueType, bool isSameBundle)
|
||||
{
|
||||
std::string formatSrcContinueType = ContinueTypeFormat(srcContinueType);
|
||||
bool continuable = false;
|
||||
|
@ -970,6 +970,34 @@ HWTEST_F(DMSContinueManagerTest, testGetFinalBundleName_001, TestSize.Level1)
|
||||
DTEST_LOG << "DMSContinueManagerTest testGetFinalBundleName_001 end" << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: testGetFinalBundleName_001
|
||||
* @tc.desc: test GetFinalBundleName
|
||||
* @tc.type: FUNC
|
||||
*/
|
||||
HWTEST_F(DMSContinueManagerTest, testIsBundleContinuable_001, TestSize.Level1)
|
||||
{
|
||||
DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_001 start" << std::endl;
|
||||
std::string srcAbilityName = "abilityName";
|
||||
std::string srcContinueType = "continueType";
|
||||
|
||||
AppExecFwk::BundleInfo localBundleInfo;
|
||||
std::vector<AbilityInfo> abilityInfos;
|
||||
AbilityInfo abilityInfo;
|
||||
std::vector<std::string> continueTypes;
|
||||
continueTypes.push_back(srcContinueType);
|
||||
abilityInfo.continueType = continueTypes;
|
||||
abilityInfo.continuable = true;
|
||||
abilityInfo.name = srcAbilityName;
|
||||
abilityInfos.push_back(abilityInfo);
|
||||
|
||||
localBundleInfo.abilityInfo = abilityInfos;
|
||||
bool ret = DMSContinueRecvMgr::GetInstance().IsBundleContinuable(localBundleInfo, srcAbilityName,
|
||||
srcContinueType, true);
|
||||
EXPECT_EQ(ret, true);
|
||||
DTEST_LOG << "DMSContinueManagerTest testIsBundleContinuable_001 end" << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: GetBundleNameByScreenOffInfo_001
|
||||
* @tc.desc: test GetBundleNameByScreenOffInfo
|
||||
|
Loading…
Reference in New Issue
Block a user