JD2022-TU1/main/extern/UbiServices/custom/testsIntegration/entityTestHelper.cpp

58 lines
1.5 KiB
C++

////////////////////////////////////////////////////////////////////////////////
// (c) Copyright, Ubisoft Entertainment Inc. || Created by Harbour //
////////////////////////////////////////////////////////////////////////////////
#include "entityTestHelper.h"
#if defined(US_SDK_FULL)
#include <ubiservices/services/entity/entityProfile.h>
#include <ubiservices/services/entity/entitySpace.h>
#include <ubiservices/core/configs/environment.h>
namespace US_NS {;
#if !defined(US_DLL)
struct EntityProfilePrivate
{
static bool extractData(const Json& source, EntityProfile& target);
};
#endif
void EntityTestHelper::setEntityId(EntityProfile& profile, const EntityId& entityId)
{
profile.m_entityId = entityId;
}
void EntityTestHelper::setProfileId(EntityProfile& profile, const ProfileId& profileId)
{
profile.m_profileId = profileId;
}
void EntityTestHelper::setSpaceId(EntityProfile& profile, const SpaceId& spaceId)
{
profile.m_spaceId = spaceId;
}
#if !defined(US_DLL)
bool EntityTestHelper::parseJson(EntityProfile& profile, const Json& entityJson)
{
return EntityProfilePrivate::extractData(entityJson, profile);
}
#endif
void EntityTestHelper::setEntityId(EntitySpace& space, const EntityId& entityId)
{
space.m_entityId = entityId;
}
void EntityTestHelper::setSpaceId(EntitySpace& space, const SpaceId& spaceId)
{
space.m_spaceId = spaceId;
}
bool EntityTestHelper::parseJson(EntitySpace& space, const Json& entityJson)
{
return space.parseJson(entityJson);
}
};
#endif // !defined(US_SDK_FULL)