TDD测试用例修改及codecheck

Signed-off-by: wangyb0625 <wangyibo38@huawei.com>
This commit is contained in:
wangyb0625
2022-05-31 20:14:37 +08:00
parent 389711a860
commit bc8a59a396
9 changed files with 19 additions and 7 deletions
+4 -2
View File
@@ -209,10 +209,11 @@ HWTEST_F(DmAuthManagerTest, AddMember_001, testing::ext::TestSize.Level0)
authManager->authResponseContext_->requestId = 234;
authManager->authResponseContext_->deviceId = "234";
int32_t pinCode = 444444;
authManager->timer_ = std::make_shared<DmTimer>();
authManager->hiChainConnector_->RegisterHiChainCallback(authManager);
authManager->SetAuthResponseState(authResponseState);
int32_t ret = authManager->AddMember(pinCode);
ASSERT_EQ(ret, ERR_DM_FAILED);
ASSERT_EQ(ret, DM_OK);
}
/**
@@ -264,8 +265,9 @@ HWTEST_F(DmAuthManagerTest, GetPinCode_001, testing::ext::TestSize.Level0)
std::shared_ptr<DmAuthManager> authManager =
std::make_shared<DmAuthManager>(softbusConnector, listener, hiChainConnector_);
authManager->authResponseContext_ = std::make_shared<DmAuthResponseContext>();
authManager->authResponseContext_->code = 123456;
int32_t ret = authManager->GetPinCode();
ASSERT_EQ(ret, ERR_DM_FAILED);
ASSERT_EQ(ret, 123456);
}
} // namespace
} // namespace DistributedHardware