mirror of
https://gitee.com/openharmony/telephony_core_service
synced 2024-11-23 08:00:07 +00:00
fix tdd block.
Signed-off-by: dingxiaochen <dingxiaochen@huawei.com>
This commit is contained in:
parent
86f9109e3c
commit
6bfaaf519c
@ -1416,63 +1416,6 @@ HWTEST_F(BranchTest, Telephony_MultiSimController_003, Function | MediumTest | L
|
||||
EXPECT_FALSE(multiSimController->IsValidData(-1));
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_MultiSimController_004
|
||||
* @tc.name test error branch
|
||||
* @tc.desc Function test
|
||||
*/
|
||||
HWTEST_F(BranchTest, Telephony_MultiSimController_004, Function | MediumTest | Level1)
|
||||
{
|
||||
std::shared_ptr<TelRilManager> telRilManager = std::make_shared<TelRilManager>();
|
||||
telRilManager->OnInit();
|
||||
std::vector<std::shared_ptr<Telephony::SimStateManager>> simStateManager = { nullptr, nullptr};
|
||||
std::vector<std::shared_ptr<Telephony::SimFileManager>> simFileManager = { nullptr, nullptr};
|
||||
for (int32_t slotId = 0; slotId < 2; slotId++) {
|
||||
simStateManager[slotId] = std::make_shared<SimStateManager>(telRilManager);
|
||||
if (simStateManager[slotId] != nullptr) {
|
||||
simStateManager[slotId]->Init(slotId);
|
||||
}
|
||||
simFileManager[slotId] = SimFileManager::CreateInstance(std::weak_ptr<ITelRilManager>(telRilManager),
|
||||
std::weak_ptr<SimStateManager>(simStateManager[slotId]));
|
||||
if (simFileManager[slotId] != nullptr) {
|
||||
simFileManager[slotId]->Init(slotId);
|
||||
}
|
||||
}
|
||||
std::shared_ptr<Telephony::MultiSimController> multiSimController =
|
||||
std::make_shared<MultiSimController>(telRilManager, simStateManager, simFileManager);
|
||||
multiSimController->Init();
|
||||
telRilManager->InitTelExtraModule(2);
|
||||
simStateManager.resize(3);
|
||||
simFileManager.resize(3);
|
||||
simStateManager[2] = std::make_shared<SimStateManager>(telRilManager);
|
||||
if (simStateManager[2] != nullptr) {
|
||||
simStateManager[2]->Init(2);
|
||||
}
|
||||
simFileManager[2] = SimFileManager::CreateInstance(std::weak_ptr<ITelRilManager>(telRilManager),
|
||||
std::weak_ptr<SimStateManager>(simStateManager[2]));
|
||||
if (simFileManager[2] != nullptr) {
|
||||
simFileManager[2]->Init(2);
|
||||
}
|
||||
multiSimController->AddExtraManagers(simStateManager[2], simFileManager[2]);
|
||||
multiSimController->ForgetAllData(0);
|
||||
multiSimController->simStateManager_[0]->simStateHandle_->iccState_.simStatus_ = 1;
|
||||
multiSimController->simStateManager_[0]->simStateHandle_->iccState_.simType_ = 2;
|
||||
multiSimController->simStateManager_[0]->simStateHandle_->iccid_ = "898600520123F0102670";
|
||||
multiSimController->simStateManager_[0]->simStateHandle_->externalType_ = CardType::SINGLE_MODE_USIM_CARD;
|
||||
multiSimController->simStateManager_[0]->simStateHandle_->externalState_ = SimState::SIM_STATE_READY;
|
||||
EXPECT_FALSE(multiSimController->InitData(-1));
|
||||
EXPECT_TRUE(multiSimController->InitData(0));
|
||||
EXPECT_TRUE(multiSimController->InitShowNumber(0));
|
||||
std::vector<IccAccountInfo> iccAccountInfoList;
|
||||
EXPECT_GE(multiSimController->GetActiveSimAccountInfoList(false, iccAccountInfoList), TELEPHONY_ERR_SUCCESS);
|
||||
EXPECT_GE(multiSimController->GetActiveSimAccountInfoList(true, iccAccountInfoList), TELEPHONY_ERR_SUCCESS);
|
||||
EXPECT_GE(multiSimController->SaveImsSwitch(0, 1), TELEPHONY_ERR_SUCCESS);
|
||||
int32_t imsSwitchValue;
|
||||
EXPECT_GE(multiSimController->QueryImsSwitch(0, imsSwitchValue), TELEPHONY_ERR_SUCCESS);
|
||||
EXPECT_FALSE(multiSimController->IsSetActiveSimInProgress(0));
|
||||
EXPECT_FALSE(multiSimController->IsSetPrimarySlotIdInProgress());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.number Telephony_SimManager_001
|
||||
* @tc.name test error branch
|
||||
|
Loading…
Reference in New Issue
Block a user