add ipc ut

Signed-off-by: liangqi <liangqi22@huawei.com>
This commit is contained in:
liangqi 2022-11-03 13:18:18 +08:00
parent 56028f91ef
commit 4a3083f4a3

View File

@ -130,4 +130,39 @@ using namespace testing::ext;
ret = clientProxy->BusCenterClientProxy::OnLeaveMetaNodeResult(networkIdValue, retCode);
EXPECT_TRUE(ret == SOFTBUS_ERR);
}
/*
* @tc.name: ON_LEAVE_LNN_RESULT_Test_001
* @tc.desc: On LEABE LNN Result
* @tc.type: FUNC
* @tc.require:
*/
HWTEST_F(BusCenterClientProxyStandardTest, ON_LEAVE_LNN_RESULT_Test_002, TestSize.Level1)
{
char pkgNameValue[] = "test";
sptr<BusCenterClientProxy> clientProxy = GetClientProxy(pkgNameValue);
char networkId[] = "1111";
int retCode = 10;
clientProxy->BusCenterClientProxy::OnLeaveLNNResult(networkId, retCode);
const char *networkId2 = nullptr;
clientProxy->BusCenterClientProxy::OnLeaveLNNResult(networkId2, retCode);
}
/*
* @tc.name: ON_LEAVE_META_NODE_RESULT_Test_002
* @tc.desc: On LEABE LNN Result
* @tc.type: FUNC
* @tc.require:
*/
HWTEST_F(BusCenterClientProxyStandardTest, ON_LEAVE_META_NODE_RESULT_Test_002, TestSize.Level1)
{
char pkgNameValue[] = "test";
sptr<BusCenterClientProxy> clientProxy = GetClientProxy(pkgNameValue);
char networkId[] = "1111";
int retCode = 10;
clientProxy->BusCenterClientProxy::OnLeaveMetaNodeResult(networkId, retCode);
const char *networkId2 = nullptr;
clientProxy->BusCenterClientProxy::OnLeaveMetaNodeResult(networkId2, retCode);
}
} // namespace OHOS