Files
o3de/Code/Framework/AzToolsFramework/Tests/Prefab/PrefabTestDataUtils.h
T
chiyenteng 23322edde7 Fix Entity id consistency issue & refactor prefab workflows/tests (#4373)
* Fix Entity id consistency issue & refactor prefab workflows/test framework

Signed-off-by: chiyteng <chiyteng@amazon.com>

* Update comments

Signed-off-by: chiyteng <chiyteng@amazon.com>

* Modify CreatePrefab and remove extra spaces

Signed-off-by: chiyteng <chiyteng@amazon.com>

* Address comments

Signed-off-by: chiyteng <chiyteng@amazon.com>

* Refactor prefab instance constructors

Signed-off-by: chiyteng <chiyteng@amazon.com>

* Remove commented out code

Signed-off-by: chiyteng <chiyteng@amazon.com>
2021-10-01 10:02:00 -07:00

41 lines
1.2 KiB
C++

/*
* Copyright (c) Contributors to the Open 3D Engine Project.
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
*
* SPDX-License-Identifier: Apache-2.0 OR MIT
*
*/
#pragma once
#include <Prefab/PrefabTestData.h>
#include <AzToolsFramework/Prefab/Link/Link.h>
namespace UnitTest
{
namespace PrefabTestDataUtils
{
LinkData CreateLinkData(
const InstanceData& instanceData,
AzToolsFramework::Prefab::TemplateId sourceTemplateId,
AzToolsFramework::Prefab::TemplateId targetTemplateId);
InstanceData CreateInstanceDataWithNoPatches(
const AZStd::string& name,
AZ::IO::PathView source);
void ValidateTemplateLoad(
const TemplateData& expectedTemplateData);
void ValidateTemplatePatches(
const AzToolsFramework::Prefab::Link& actualLink,
const AzToolsFramework::Prefab::PrefabDom& expectedTemplatePatches);
void CheckIfTemplatesConnected(
const TemplateData& expectedSourceTemplateData,
const TemplateData& expectedTargetTemplateData,
const LinkData& expectedLinkData);
}
}