mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2025-02-25 08:51:18 +00:00
DMS上报应用信息补充测试用例
Signed-off-by: du-zhihai <duzhihai@huawei.com> Change-Id: Icb9990a63bc642e6f06de769775a212e70f02937
This commit is contained in:
parent
f92b2fab5a
commit
5c6f86b097
@ -1006,27 +1006,36 @@ HWTEST_F(DistributedSchedServiceTest, StartContinuation_001, TestSize.Level1)
|
||||
want, missionId, callerUid, status, accessToken);
|
||||
EXPECT_EQ(static_cast<int>(INVALID_REMOTE_PARAMETERS_ERR), ret);
|
||||
CallerInfo callerInfo;
|
||||
ConnectInfo connectInfo;
|
||||
/**
|
||||
* @tc.steps: step1. ReportDistributedComponentChange when componentChangeHandler_ is nullptr
|
||||
*/
|
||||
DistributedSchedService::GetInstance().componentChangeHandler_ = nullptr;
|
||||
DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo,
|
||||
1, IDistributedSched::CALL, IDistributedSched::CALLER);
|
||||
|
||||
/**
|
||||
* @tc.steps: step2. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr
|
||||
* @tc.steps: step2. ReportDistributedComponentChange when componentChangeHandler_ is nullptr
|
||||
*/
|
||||
DistributedSchedService::GetInstance().ReportDistributedComponentChange(connectInfo,
|
||||
1, IDistributedSched::CALL, IDistributedSched::CALLEE);
|
||||
/**
|
||||
* @tc.steps: step3. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr
|
||||
*/
|
||||
auto runner = AppExecFwk::EventRunner::Create("DmsComponentChange");
|
||||
DistributedSchedService::GetInstance().componentChangeHandler_ = std::make_shared<AppExecFwk::EventHandler>(runner);
|
||||
DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo,
|
||||
1, IDistributedSched::CALL, IDistributedSched::CALLER);
|
||||
/**
|
||||
* @tc.steps: step3. ReportDistributedComponentChange when callerInfo.bundleNames is not empty
|
||||
* @tc.steps: step4. ReportDistributedComponentChange when callerInfo.bundleNames is not empty
|
||||
*/
|
||||
callerInfo.bundleNames.emplace_back("bundleName");
|
||||
DistributedSchedService::GetInstance().ReportDistributedComponentChange(callerInfo,
|
||||
1, IDistributedSched::CALL, IDistributedSched::CALLER);
|
||||
DTEST_LOG << "DSchedContinuationTest StartContinuation_001 end" << std::endl;
|
||||
/**
|
||||
* @tc.steps: step5. ReportDistributedComponentChange when componentChangeHandler_ is not nullptr
|
||||
*/
|
||||
DistributedSchedService::GetInstance().ReportDistributedComponentChange(connectInfo,
|
||||
1, IDistributedSched::CALL, IDistributedSched::CALLEE);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user