mirror of
https://gitee.com/openharmony/ability_dmsfwk
synced 2024-11-23 06:20:07 +00:00
add dmsfwk 3 UT
Signed-off-by: c30051536 <chenbin179@huawei.com>
This commit is contained in:
parent
fec7028599
commit
42d3000177
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 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
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2024 Huawei Device Co., Ltd.
|
||||
* Copyright (c) 2023-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
|
||||
|
@ -145,13 +145,9 @@ HWTEST_F(DistributedClientTest, UnRegisterDSchedEventListener_002, TestSize.Leve
|
||||
HWTEST_F(DistributedClientTest, GetContinueInfo_001, TestSize.Level3)
|
||||
{
|
||||
DTEST_LOG << "DistributedClientTest GetContinueInfo_001 start" << std::endl;
|
||||
sptr<IRemoteObject> proxy = GetDmsProxy();
|
||||
if (proxy == nullptr) {
|
||||
return;
|
||||
}
|
||||
ContinueInfo continueInfo;
|
||||
int32_t result = distributedClient_.GetContinueInfo(continueInfo);
|
||||
EXPECT_EQ(result, ERR_NONE);
|
||||
EXPECT_EQ(result, ERR_FLATTEN_OBJECT);
|
||||
DTEST_LOG << "DistributedClientTest GetContinueInfo_001 end" << std::endl;
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2022-2023 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
|
||||
@ -218,5 +218,39 @@ HWTEST_F(DmsSaClientTest, OnRemoveSystemAbility_001, TestSize.Level3)
|
||||
EXPECT_EQ(result, NO_ERROR);
|
||||
DTEST_LOG << "DmsSaClientTest OnRemoveSystemAbility_001 end" << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DmsSAStatusChangeOnAddSystemAbility_001
|
||||
* @tc.desc: DmsSAStatusChangeOnAddSystemAbility
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: I9K4JN
|
||||
*/
|
||||
HWTEST_F(DmsSaClientTest, DmsSAStatusChangeOnAddSystemAbility_001, TestSize.Level3)
|
||||
{
|
||||
DTEST_LOG << "DmsSaClientTest DmsSAStatusChangeOnAddSystemAbility_001 start" << std::endl;
|
||||
DmsSystemAbilityStatusChange dmsSystemAbilityStatusChange;
|
||||
//systemAbilityId not is DISTRIBUTED_SCHED_SA_ID
|
||||
dmsSystemAbilityStatusChange.OnAddSystemAbility(-1, DEVICE_ID);
|
||||
//systemAbilityId is DISTRIBUTED_SCHED_SA_ID
|
||||
dmsSystemAbilityStatusChange.OnAddSystemAbility(DISTRIBUTED_SCHED_SA_ID, DEVICE_ID);
|
||||
DTEST_LOG << "DmsSaClientTest DmsSAStatusChangeOnAddSystemAbility_001 end" << std::endl;
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: DmsSAStatusChangeOnRemoveSystemAbility_001
|
||||
* @tc.desc: DmsSAStatusChangeOnRemoveSystemAbility_001
|
||||
* @tc.type: FUNC
|
||||
* @tc.require: I9K4JN
|
||||
*/
|
||||
HWTEST_F(DmsSaClientTest, DmsSAStatusChangeOnRemoveSystemAbility_001, TestSize.Level3)
|
||||
{
|
||||
DTEST_LOG << "DmsSaClientTest DmsSAStatusChangeOnRemoveSystemAbility_001 start" << std::endl;
|
||||
DmsSystemAbilityStatusChange dmsSystemAbilityStatusChange;
|
||||
//systemAbilityId not is DISTRIBUTED_SCHED_SA_ID
|
||||
dmsSystemAbilityStatusChange.OnRemoveSystemAbility(-1, DEVICE_ID);
|
||||
//systemAbilityId is DISTRIBUTED_SCHED_SA_ID
|
||||
dmsSystemAbilityStatusChange.OnRemoveSystemAbility(DISTRIBUTED_SCHED_SA_ID, DEVICE_ID);
|
||||
DTEST_LOG << "DmsSaClientTest DmsSAStatusChangeOnRemoveSystemAbility_001 end" << std::endl;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user