fix: ut coverage

Signed-off-by: 居凯 <shun0304@126.com>
Change-Id: I386fdf0c777a23bd6621feef6b29dfe975d9275e
This commit is contained in:
居凯 2024-11-13 16:11:23 +08:00
parent cb157db698
commit db404c15b2

View File

@ -706,7 +706,7 @@ HWTEST_F(UserAuthStubTest, UserAuthStubAuthUserStub011, TestSize.Level0)
EXPECT_TRUE(data.WriteString("verifierNetworkId"));
EXPECT_TRUE(data.WriteBool(true));
EXPECT_TRUE(data.WriteString("collectorNetworkId"));
EXPECT_TRUE(data.WriteBool(false));
EXPECT_TRUE(data.WriteBool(true));
EXPECT_TRUE(data.WriteUint32(collectorTokenId));
EXPECT_NE(callback->AsObject(), nullptr);
EXPECT_TRUE(data.WriteRemoteObject(callback->AsObject()));
@ -1020,10 +1020,7 @@ HWTEST_F(UserAuthStubTest, UserAuthStubPrepareRemoteAuthStub_002, TestSize.Level
EXPECT_TRUE(data.WriteString("collectorNetworkId"));
EXPECT_NE(callback->AsObject(), nullptr);
EXPECT_TRUE(data.WriteRemoteObject(callback->AsObject()));
EXPECT_EQ(READ_PARCEL_ERROR, service.OnRemoteRequest(code, data, reply, option));
int32_t result;
EXPECT_FALSE(reply.ReadInt32(result));
EXPECT_EQ(result, SUCCESS);
EXPECT_EQ(GENERAL_ERROR, service.OnRemoteRequest(code, data, reply, option));
}
HWTEST_F(UserAuthStubTest, UserAuthStubPrepareRemoteAuthStub_003, TestSize.Level0)
@ -1042,7 +1039,7 @@ HWTEST_F(UserAuthStubTest, UserAuthStubPrepareRemoteAuthStub_003, TestSize.Level
EXPECT_TRUE(data.WriteRemoteObject(callback->AsObject()));
EXPECT_EQ(SUCCESS, service.OnRemoteRequest(code, data, reply, option));
int32_t result;
EXPECT_FALSE(reply.ReadInt32(result));
EXPECT_TRUE(reply.ReadInt32(result));
EXPECT_EQ(result, SUCCESS);
}
} // namespace UserAuth