mirror of
https://gitee.com/openharmony/deviceprofile_device_info_manager
synced 2025-02-17 06:08:26 +00:00
add UT
Signed-off-by: wangzhaohao <wangzhaohao@huawei.com>
This commit is contained in:
parent
5e313b4c64
commit
52d362e9e3
@ -124,6 +124,21 @@ HWTEST_F(DeviceProfileManagerTest, UnInit001, TestSize.Level1)
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: UnInit002
|
||||
* @tc.desc: deviceProfileStore_ is nullptr
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, UnInit002, TestSize.Level1)
|
||||
{
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
int32_t ret = DeviceProfileManager::GetInstance().UnInit();
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
DeviceProfileManager::GetInstance().Init();
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: ReInit001
|
||||
* @tc.desc: ReInit succeed.
|
||||
@ -283,6 +298,32 @@ HWTEST_F(DeviceProfileManagerTest, PutDeviceProfile005, TestSize.Level1)
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutDeviceProfile006
|
||||
* @tc.desc: PutDeviceProfile succeed.
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, PutDeviceProfile006, TestSize.Level1)
|
||||
{
|
||||
DeviceProfile deviceProfile;
|
||||
ContentSensorManagerUtils::GetInstance().localUdid_ = "anything111";
|
||||
deviceProfile.SetDeviceId("anything111");
|
||||
deviceProfile.SetDeviceTypeName("anything");
|
||||
deviceProfile.SetDeviceTypeId(0);
|
||||
deviceProfile.SetDeviceName("anything");
|
||||
deviceProfile.SetManufactureName("anything");
|
||||
deviceProfile.SetDeviceModel("anything");
|
||||
deviceProfile.SetStorageCapability(1);
|
||||
deviceProfile.SetOsSysCap("anything");
|
||||
deviceProfile.SetOsApiLevel(1);
|
||||
deviceProfile.SetOsVersion("anything");
|
||||
deviceProfile.SetOsType(1);
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutDeviceProfile(deviceProfile);
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutServiceProfile001
|
||||
* @tc.desc: PutServiceProfile succeed.
|
||||
@ -383,6 +424,43 @@ HWTEST_F(DeviceProfileManagerTest, PutServiceProfile005, TestSize.Level1)
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutServiceProfile006
|
||||
* @tc.desc: isFirst_.load() == true
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, PutServiceProfile006, TestSize.Level1)
|
||||
{
|
||||
ServiceProfile serviceProfile;
|
||||
ContentSensorManagerUtils::GetInstance().localUdid_ = "deviceId112";
|
||||
serviceProfile.SetDeviceId("deviceId112");
|
||||
serviceProfile.SetServiceName("serviceName");
|
||||
serviceProfile.SetServiceType("serviceType");
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(true);
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutServiceProfile(serviceProfile);
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
EXPECT_EQ(ret, DP_SUCCESS);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutServiceProfile007
|
||||
* @tc.desc: deviceProfileStore_ == nullptr
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, PutServiceProfile007, TestSize.Level1)
|
||||
{
|
||||
ServiceProfile serviceProfile;
|
||||
ContentSensorManagerUtils::GetInstance().localUdid_ = "deviceId113";
|
||||
serviceProfile.SetDeviceId("deviceId113");
|
||||
serviceProfile.SetServiceName("serviceName");
|
||||
serviceProfile.SetServiceType("serviceType");
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutServiceProfile(serviceProfile);
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutServiceProfileBatch001
|
||||
* @tc.desc: PutServiceProfileBatch succeed.
|
||||
@ -407,6 +485,9 @@ HWTEST_F(DeviceProfileManagerTest, PutServiceProfileBatch001, TestSize.Level1)
|
||||
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutServiceProfileBatch(serviceProfiles);
|
||||
EXPECT_EQ(ret, DP_SUCCESS);
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
ret = DeviceProfileManager::GetInstance().PutServiceProfileBatch(serviceProfiles);
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -506,6 +587,7 @@ HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfile003, TestSize.Level1)
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfile004, TestSize.Level1)
|
||||
{
|
||||
ContentSensorManagerUtils::GetInstance().localUdid_ = "deviceId10";
|
||||
CharacteristicProfile charProfile10;
|
||||
charProfile10.SetDeviceId("deviceId10");
|
||||
charProfile10.SetServiceName("serviceName10");
|
||||
@ -514,7 +596,7 @@ HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfile004, TestSize.Level1)
|
||||
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutCharacteristicProfile(charProfile10);
|
||||
EXPECT_EQ(ret, DP_INVALID_PARAMS);
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
DeviceProfileManager::GetInstance().Init();
|
||||
}
|
||||
|
||||
@ -541,6 +623,26 @@ HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfile005, TestSize.Level1)
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutCharacteristicProfile006
|
||||
* @tc.desc: isFirst_.load() = true
|
||||
* @tc.type: FUNC
|
||||
* @tc.require:
|
||||
*/
|
||||
HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfile006, TestSize.Level1)
|
||||
{
|
||||
CharacteristicProfile charProfile;
|
||||
ContentSensorManagerUtils::GetInstance().localUdid_ = "deviceId111";
|
||||
charProfile.SetDeviceId("deviceId111");
|
||||
charProfile.SetServiceName("serviceName");
|
||||
charProfile.SetCharacteristicKey("characteristicKey");
|
||||
charProfile.SetCharacteristicValue("characteristicValue");
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(true);
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutCharacteristicProfile(charProfile);
|
||||
EXPECT_EQ(ret, DP_SUCCESS);
|
||||
DeviceProfileManager::GetInstance().isFirst_.store(false);
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: PutCharacteristicProfileBatch001
|
||||
* @tc.desc: PutCharacteristicProfileBatch succeed.
|
||||
@ -567,6 +669,10 @@ HWTEST_F(DeviceProfileManagerTest, PutCharacteristicProfileBatch001, TestSize.Le
|
||||
|
||||
int32_t ret = DeviceProfileManager::GetInstance().PutCharacteristicProfileBatch(charProfiles);
|
||||
EXPECT_EQ(ret, DP_SUCCESS);
|
||||
|
||||
DeviceProfileManager::GetInstance().deviceProfileStore_ = nullptr;
|
||||
ret = DeviceProfileManager::GetInstance().PutCharacteristicProfileBatch(charProfiles);
|
||||
EXPECT_EQ(ret, DP_KV_DB_PTR_NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1409,5 +1515,55 @@ HWTEST_F(DeviceProfileManagerTest, RunloadedFunction002, TestSize.Level1)
|
||||
int32_t ret = DeviceProfileManager::GetInstance().RunloadedFunction(deviceId, syncCb);
|
||||
EXPECT_EQ(ret, DP_LOAD_SYNC_ADAPTER_FAILED);
|
||||
}
|
||||
|
||||
HWTEST_F(DeviceProfileManagerTest, GetInKvDB002, TestSize.Level1)
|
||||
{
|
||||
string deviceId = ContentSensorManagerUtils::GetInstance().ObtainLocalUdid();
|
||||
DeviceProfile deviceProfile2;
|
||||
deviceProfile2.SetDeviceId(deviceId);
|
||||
deviceProfile2.SetDeviceTypeName("GetInKvDB001_DeviceTypeName2");
|
||||
deviceProfile2.SetDeviceTypeId(0);
|
||||
deviceProfile2.SetDeviceName("GetInKvDB001_DeviceName2");
|
||||
deviceProfile2.SetManufactureName("GetInKvDB001_ManufactureName2");
|
||||
deviceProfile2.SetDeviceModel("GetInKvDB001_DeviceModel2");
|
||||
deviceProfile2.SetStorageCapability(1);
|
||||
deviceProfile2.SetOsSysCap("GetInKvDB001_OsSysCap2");
|
||||
deviceProfile2.SetOsApiLevel(1);
|
||||
deviceProfile2.SetOsVersion("GetInKvDB001_OsVersion2");
|
||||
deviceProfile2.SetOsType(1);
|
||||
DeviceProfileManager::GetInstance().PutDeviceProfile(deviceProfile2);
|
||||
|
||||
ServiceProfile serviceProfile5;
|
||||
serviceProfile5.SetDeviceId(deviceId);
|
||||
serviceProfile5.SetServiceName("GetInKvDB001_ServiceName2");
|
||||
serviceProfile5.SetServiceType("GetInKvDB001_ServiceType2");
|
||||
DeviceProfileManager::GetInstance().PutServiceProfile(serviceProfile5);
|
||||
|
||||
CharacteristicProfile charProfile5;
|
||||
charProfile5.SetDeviceId(deviceId);
|
||||
charProfile5.SetServiceName("GetInKvDB001_ServiceName2");
|
||||
charProfile5.SetCharacteristicKey("GetInKvDB001_CharacteristicKey2");
|
||||
charProfile5.SetCharacteristicValue("GetInKvDB001_CharacteristicValue2");
|
||||
DeviceProfileManager::GetInstance().PutCharacteristicProfile(charProfile5);
|
||||
|
||||
ProfileCache::GetInstance().DeleteDeviceProfile(deviceId);
|
||||
ProfileCache::GetInstance().DeleteServiceProfile("GetInKvDB001_DeviceId2", "GetInKvDB001_ServiceName");
|
||||
ProfileCache::GetInstance().DeleteCharProfile("GetInKvDB001_DeviceId2", "GetInKvDB001_ServiceName",
|
||||
"GetInKvDB001_CharacteristicKey2");
|
||||
|
||||
DeviceProfile outDeviceProfile;
|
||||
DeviceProfileManager::GetInstance().GetDeviceProfile(deviceId, outDeviceProfile);
|
||||
|
||||
string serviceName2 = "GetInKvDB001_ServiceName2";
|
||||
ServiceProfile outServiceProfile;
|
||||
DeviceProfileManager::GetInstance().GetServiceProfile(deviceId, serviceName2, outServiceProfile);
|
||||
|
||||
string serviceName3 = "GetInKvDB001_ServiceName2";
|
||||
string characteristicKey3 = "GetInKvDB001_CharacteristicKey2";
|
||||
CharacteristicProfile outCharProfile;
|
||||
int32_t ret = DeviceProfileManager::GetInstance().GetCharacteristicProfile(deviceId, serviceName3,
|
||||
characteristicKey3, outCharProfile);
|
||||
EXPECT_EQ(ret, DP_SUCCESS);
|
||||
}
|
||||
} // namespace DistributedDeviceProfile
|
||||
} // namespace OHOS
|
||||
} // namespace OHOS
|
||||
|
@ -29,6 +29,8 @@
|
||||
#include "subscribe_profile_manager.h"
|
||||
#include "event_handler_factory.h"
|
||||
#include "distributed_device_profile_constants.h"
|
||||
#include "dp_inited_callback_stub.h"
|
||||
#include "i_dp_inited_callback.h"
|
||||
#undef private
|
||||
#undef protected
|
||||
|
||||
@ -83,6 +85,20 @@ void DpProfileServiceTest::TearDown()
|
||||
{
|
||||
}
|
||||
|
||||
class DpInitedCallback : public DpInitedCallbackStub {
|
||||
public:
|
||||
DpInitedCallback()
|
||||
{
|
||||
}
|
||||
~DpInitedCallback()
|
||||
{
|
||||
}
|
||||
int32_t OnDpInited()
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
HWTEST_F(DpProfileServiceTest, Init_001, TestSize.Level1)
|
||||
{
|
||||
int32_t ret = DistributedDeviceProfileServiceNew::GetInstance().Init();
|
||||
@ -117,6 +133,8 @@ HWTEST_F(DpProfileServiceTest, PutAccessControlProfile_001, TestSize.Level1)
|
||||
AccessControlProfile accessControlProfile;
|
||||
int32_t ret = DistributedDeviceProfileServiceNew::GetInstance().PutAccessControlProfile(accessControlProfile);
|
||||
EXPECT_EQ(DP_PERMISSION_DENIED, ret);
|
||||
DistributedDeviceProfileServiceNew::GetInstance().DelayUnloadTask();
|
||||
|
||||
}
|
||||
|
||||
HWTEST_F(DpProfileServiceTest, UpdateAccessControlProfile_001, TestSize.Level1)
|
||||
@ -278,5 +296,20 @@ HWTEST_F(DpProfileServiceTest, Dump_001, TestSize.Level1)
|
||||
int32_t ret = DistributedDeviceProfileServiceNew::GetInstance().Dump(fd, args);
|
||||
EXPECT_EQ(DP_INVALID_PARAMS, ret);
|
||||
}
|
||||
|
||||
HWTEST_F(DpProfileServiceTest, SubscribeDeviceProfileInited_001, TestSize.Level1)
|
||||
{
|
||||
int32_t saId = 1000;
|
||||
OHOS::sptr<IRemoteObject> initedCb = sptr<IRemoteObject>(new DpInitedCallback());
|
||||
int32_t ret = DistributedDeviceProfileServiceNew::GetInstance().SubscribeDeviceProfileInited(saId, initedCb);
|
||||
EXPECT_EQ(DP_PERMISSION_DENIED, ret);
|
||||
}
|
||||
|
||||
HWTEST_F(DpProfileServiceTest, UnSubscribeDeviceProfileInited_001, TestSize.Level1)
|
||||
{
|
||||
int32_t saId = 1000;
|
||||
int32_t ret = DistributedDeviceProfileServiceNew::GetInstance().UnSubscribeDeviceProfileInited(saId);
|
||||
EXPECT_EQ(DP_PERMISSION_DENIED, ret);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -440,6 +440,56 @@ HWTEST_F(ProfileUtilsTest, AccessControlProfileTranslateEntries001, TestSize.Lev
|
||||
EXPECT_EQ("123456", outProfile.GetTrustDeviceId());
|
||||
}
|
||||
|
||||
HWTEST_F(ProfileUtilsTest, AccessControlProfileTranslateEntries002, TestSize.Level1)
|
||||
{
|
||||
Accesser accesser;
|
||||
accesser.SetAccesserDeviceId("acer2");
|
||||
accesser.SetAccesserUserId(11);
|
||||
accesser.SetAccesserAccountId("a2");
|
||||
accesser.SetAccesserTokenId(111);
|
||||
accesser.SetAccesserBundleName("b2");
|
||||
accesser.SetAccesserHapSignature("h2");
|
||||
accesser.SetAccesserBindLevel(1);
|
||||
|
||||
Accessee accessee;
|
||||
accessee.SetAccesseeDeviceId("acee2");
|
||||
accessee.SetAccesseeUserId(22);
|
||||
accessee.SetAccesseeAccountId("a2");
|
||||
accessee.SetAccesseeTokenId(222);
|
||||
accessee.SetAccesseeBundleName("bb2");
|
||||
accessee.SetAccesseeHapSignature("h2");
|
||||
accessee.SetAccesseeBindLevel(1);
|
||||
|
||||
AccessControlProfile profile;
|
||||
profile.SetTrustDeviceId("1234567");
|
||||
profile.SetSessionKey("key1");
|
||||
profile.SetBindType(1);
|
||||
profile.SetAuthenticationType(1);
|
||||
profile.SetDeviceIdType(1);
|
||||
profile.SetDeviceIdHash("abcd");
|
||||
profile.SetStatus(0);
|
||||
profile.SetValidPeriod(1);
|
||||
profile.SetLastAuthTime(5);
|
||||
profile.SetBindLevel(0);
|
||||
|
||||
profile.SetAccesser(accesser);
|
||||
profile.SetAccessee(accessee);
|
||||
|
||||
ValuesBucket values;
|
||||
ValueObject valueObject;
|
||||
string strValue = "";
|
||||
int32_t res1 = ProfileUtils::AccessControlProfileToEntries(profile, values);
|
||||
EXPECT_EQ(DP_SUCCESS, res1);
|
||||
values.GetObject(TRUST_DEVICE_ID, valueObject);
|
||||
valueObject.GetString(strValue);
|
||||
EXPECT_EQ("1234567", strValue);
|
||||
|
||||
AccessControlProfile outProfile;
|
||||
int32_t res2 = ProfileUtils::EntriesToAccessControlProfile(values, outProfile);
|
||||
EXPECT_EQ(DP_SUCCESS, res2);
|
||||
EXPECT_EQ("1234567", outProfile.GetTrustDeviceId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: AccesserTranslateEntries001
|
||||
* @tc.desc: AccesserToEntries and EntriesToAccesser.
|
||||
@ -598,6 +648,106 @@ HWTEST_F(ProfileUtilsTest, ServiceProfileTranslateEntries001, TestSize.Level1)
|
||||
EXPECT_EQ("deviceId", outServiceProfile.GetDeviceId());
|
||||
}
|
||||
|
||||
HWTEST_F(ProfileUtilsTest, AccesserTranslateEntries002, TestSize.Level1)
|
||||
{
|
||||
Accesser accesser;
|
||||
accesser.SetAccesserDeviceId("acer2");
|
||||
accesser.SetAccesserUserId(11);
|
||||
accesser.SetAccesserAccountId("a1");
|
||||
accesser.SetAccesserTokenId(111);
|
||||
accesser.SetAccesserBundleName("b1");
|
||||
accesser.SetAccesserHapSignature("h1");
|
||||
accesser.SetAccesserBindLevel(1);
|
||||
|
||||
Accessee accessee;
|
||||
accessee.SetAccesseeDeviceId("acee2");
|
||||
accessee.SetAccesseeUserId(22);
|
||||
accessee.SetAccesseeAccountId("a1");
|
||||
accessee.SetAccesseeTokenId(222);
|
||||
accessee.SetAccesseeBundleName("bb1");
|
||||
accessee.SetAccesseeHapSignature("h1");
|
||||
accessee.SetAccesseeBindLevel(1);
|
||||
|
||||
AccessControlProfile profile;
|
||||
profile.SetTrustDeviceId("123456");
|
||||
profile.SetSessionKey("key1");
|
||||
profile.SetBindType(1);
|
||||
profile.SetAuthenticationType(1);
|
||||
profile.SetDeviceIdType(1);
|
||||
profile.SetDeviceIdHash("abcd");
|
||||
profile.SetStatus(0);
|
||||
profile.SetValidPeriod(1);
|
||||
profile.SetLastAuthTime(5);
|
||||
profile.SetBindLevel(0);
|
||||
|
||||
profile.SetAccesser(accesser);
|
||||
profile.SetAccessee(accessee);
|
||||
|
||||
ValuesBucket values;
|
||||
ValueObject valueObject;
|
||||
string strValue = "";
|
||||
int32_t res1 = ProfileUtils::AccesserToEntries(profile, values);
|
||||
EXPECT_EQ(DP_SUCCESS, res1);
|
||||
values.GetObject(ACCESSER_DEVICE_ID, valueObject);
|
||||
valueObject.GetString(strValue);
|
||||
EXPECT_EQ("acer2", strValue);
|
||||
|
||||
Accesser outAccesser;
|
||||
int32_t res2 = ProfileUtils::EntriesToAccesser(values, outAccesser);
|
||||
EXPECT_EQ(DP_SUCCESS, res2);
|
||||
EXPECT_EQ("acer2", outAccesser.GetAccesserDeviceId());
|
||||
}
|
||||
|
||||
HWTEST_F(ProfileUtilsTest, AccesseeTranslateEntries002, TestSize.Level1)
|
||||
{
|
||||
Accesser accesser;
|
||||
accesser.SetAccesserDeviceId("acer2");
|
||||
accesser.SetAccesserUserId(11);
|
||||
accesser.SetAccesserAccountId("a1");
|
||||
accesser.SetAccesserTokenId(111);
|
||||
accesser.SetAccesserBundleName("b1");
|
||||
accesser.SetAccesserHapSignature("h1");
|
||||
accesser.SetAccesserBindLevel(1);
|
||||
|
||||
Accessee accessee;
|
||||
accessee.SetAccesseeDeviceId("acee2");
|
||||
accessee.SetAccesseeUserId(22);
|
||||
accessee.SetAccesseeAccountId("a1");
|
||||
accessee.SetAccesseeTokenId(222);
|
||||
accessee.SetAccesseeBundleName("bb1");
|
||||
accessee.SetAccesseeHapSignature("h1");
|
||||
accessee.SetAccesseeBindLevel(1);
|
||||
|
||||
AccessControlProfile profile;
|
||||
profile.SetTrustDeviceId("123456");
|
||||
profile.SetSessionKey("key1");
|
||||
profile.SetBindType(1);
|
||||
profile.SetAuthenticationType(1);
|
||||
profile.SetDeviceIdType(1);
|
||||
profile.SetDeviceIdHash("abcd");
|
||||
profile.SetStatus(0);
|
||||
profile.SetValidPeriod(1);
|
||||
profile.SetLastAuthTime(5);
|
||||
profile.SetBindLevel(0);
|
||||
|
||||
profile.SetAccesser(accesser);
|
||||
profile.SetAccessee(accessee);
|
||||
|
||||
ValuesBucket values;
|
||||
ValueObject valueObject;
|
||||
string strValue = "";
|
||||
int32_t res1 = ProfileUtils::AccesseeToEntries(profile, values);
|
||||
EXPECT_EQ(DP_SUCCESS, res1);
|
||||
values.GetObject(ACCESSEE_DEVICE_ID, valueObject);
|
||||
valueObject.GetString(strValue);
|
||||
EXPECT_EQ("acee2", strValue);
|
||||
|
||||
Accessee outAccessee;
|
||||
int32_t res2 = ProfileUtils::EntriesToAccessee(values, outAccessee);
|
||||
EXPECT_EQ(DP_SUCCESS, res2);
|
||||
EXPECT_EQ("acee2", outAccessee.GetAccesseeDeviceId());
|
||||
}
|
||||
|
||||
/**
|
||||
* @tc.name: CharacteristicProfileTranslateEntries001
|
||||
* @tc.desc: CharacteristicProfileToEntries and EntriesToCharProfile.
|
||||
|
Loading…
x
Reference in New Issue
Block a user