[需求]凭据管理TDD测试用例

Signed-off-by: @shi-xiaoxiao-iris <shixiaoxiao2@huawei.com>
This commit is contained in:
@shi-xiaoxiao-iris
2022-07-05 16:01:16 +08:00
parent 41f9af115f
commit 910e231065
+6 -6
View File
@@ -2639,9 +2639,9 @@ HWTEST_F(DeviceManagerImplTest, ImportCredential_002, testing::ext::TestSize.Lev
{
std::string packName = "com.ohos.test";
std::string credentialInfo = R"({"processType":1,"authType":1,"userId":"123",
"credentialData":[ {"credentialType":1,"credentialId":"104",
"credentialData": [{ "credentialType": 1, "credentialId": "104",
"authCode":"10F9F0576E61730193D2052B7F771887124A68F1607EFCF7796C1491F834CD92",
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":""} ]})";
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":"" }]})";
std::shared_ptr<MockIpcClientProxy> mockInstance = std::make_shared<MockIpcClientProxy>();
DeviceManagerImpl::GetInstance().ipcClientProxy_ = mockInstance;
EXPECT_CALL(*mockInstance, SendRequest(testing::_, testing::_, testing::_))
@@ -2666,9 +2666,9 @@ HWTEST_F(DeviceManagerImplTest, ImportCredential_003, testing::ext::TestSize.Lev
{
std::string packName = "com.ohos.test";
std::string credentialInfo = R"({"processType":1,"authType":1,"userId":"123",
"credentialData":[ {"credentialType":1,"credentialId":"104",
"credentialData": [{ "credentialType": 1, "credentialId": "104",
"authCode":"10F9F0576E61730193D2052B7F771887124A68F1607EFCF7796C1491F834CD92",
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":""}] })";
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":"" }]})";
std::shared_ptr<MockIpcClientProxy> mockInstance = std::make_shared<MockIpcClientProxy>();
DeviceManagerImpl::GetInstance().ipcClientProxy_ = mockInstance;
EXPECT_CALL(*mockInstance, SendRequest(testing::_, testing::_, testing::_))
@@ -2693,9 +2693,9 @@ HWTEST_F(DeviceManagerImplTest, ImportCredential_004, testing::ext::TestSize.Lev
{
std::string packName = "com.ohos.test";
std::string credentialInfo = R"({"processType":1,"authType":1,"userId":"123",
"credentialData":[ {"credentialType":1,"credentialId":"104",
"credentialData": [{ "credentialType": 1, "credentialId": "104",
"authCode":"10F9F0576E61730193D2052B7F771887124A68F1607EFCF7796C1491F834CD92",
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":""} ]})";
"serverPk":"","pkInfoSignature":"","pkInfo":"","peerDeviceId":"" }]})";
std::shared_ptr<MockIpcClientProxy> mockInstance = std::make_shared<MockIpcClientProxy>();
DeviceManagerImpl::GetInstance().ipcClientProxy_ = mockInstance;
EXPECT_CALL(*mockInstance, SendRequest(testing::_, testing::_, testing::_))