未验证 提交 1aecf115 编写于 作者: 张泊远yg 提交者: Gitee

update ipc/native/test/unittest/common/ipc_binder_databus_invoker_unittest.cpp.

Signed-off-by: N张泊远yg <zhangboyuan1@huawei.com>
Signed-off-by: N张泊远yg <zhangboyuan1@huawei.com>
上级 088b4909
......@@ -354,36 +354,6 @@ HWTEST_F(IPCDbinderDataBusInvokerTest, AuthSession2Proxy003, TestSize.Level1)
EXPECT_FALSE(res);
}
/**
* @tc.name: AuthSession2Proxy004
* @tc.desc: AuthSession2Proxy
* @tc.type: FUNC
*/
HWTEST_F(IPCDbinderDataBusInvokerTest, AuthSession2Proxy004, TestSize.Level1)
{
uint32_t handle = 0;
IPCObjectProxy *ipcProxy = new IPCObjectProxy(handle, u"testproxy");
std::shared_ptr<MockSessionImpl> session = std::make_shared<MockSessionImpl>();
std::shared_ptr<DBinderSessionObject> databusSession =
std::make_shared<DBinderSessionObject>(session, SERVICE_NAME_TEST, DEVICE_ID_TEST, 1, ipcProxy, 1);
DBinderDatabusInvoker testInvoker;
EXPECT_CALL(*session, GetPeerPid())
.WillRepeatedly(testing::Return(1));
EXPECT_CALL(*session, GetPeerUid())
.WillRepeatedly(testing::Return(1));
EXPECT_CALL(*session, GetPeerDeviceId())
.WillRepeatedly(testing::ReturnRef("test"));
bool res = testInvoker.AuthSession2Proxy(handle, databusSession);
EXPECT_FALSE(res);
databusSession->proxy_ = nullptr;
delete ipcProxy;
}
/**
* @tc.name: QuerySessionOfBinderProxy001
* @tc.desc: QuerySessionOfBinderProxy
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册