17
17
namespace UnitTest
18
18
{
19
19
constexpr AZ::Uuid Uuid_RemoveThisComponent (" {6E29CD1C-D2CF-4763-80E1-F45FFA439A6A}" );
20
- constexpr AZ::Uuid Uuid_ServerComponent (" {9218A873-1525-4278-AC07-17AD6A6B8374}" );
20
+ constexpr AZ::Uuid Uuid_KeepThisComponent (" {9218A873-1525-4278-AC07-17AD6A6B8374}" );
21
21
constexpr AZ::Uuid Uuid_DependentComponent (" {95421870-F6FD-44D2-AA5F-AF85FD977F75}" );
22
22
const AZStd::set<AZ::Uuid> ExcludedComponents = { Uuid_RemoveThisComponent };
23
23
24
24
const char * PlatformTag = " platform_1" ;
25
25
const char * EntityName = " entity_1" ;
26
26
const AZ::Crc32 ComponentService = AZ_CRC(" good_service" );
27
27
28
- class ServerComponent : public AZ ::Component
28
+ class KeepThisComponent : public AZ ::Component
29
29
{
30
30
public:
31
- AZ_COMPONENT (ServerComponent, Uuid_ServerComponent );
31
+ AZ_COMPONENT (KeepThisComponent, Uuid_KeepThisComponent );
32
32
static void Reflect (AZ::ReflectContext* context)
33
33
{
34
34
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
35
35
{
36
- serializeContext->Class <ServerComponent , AZ::Component>()->Version (1 );
36
+ serializeContext->Class <KeepThisComponent , AZ::Component>()->Version (1 );
37
37
}
38
38
}
39
39
40
- ServerComponent () = default ;
40
+ KeepThisComponent () = default ;
41
41
void Activate () override {}
42
42
void Deactivate () override {}
43
43
};
@@ -93,7 +93,7 @@ namespace UnitTest
93
93
{
94
94
m_application.reset (aznew AzToolsFramework::ToolsApplication ());
95
95
m_application.get ()->Start (AzFramework::Application::Descriptor ());
96
- m_application.get ()->RegisterComponentDescriptor (ServerComponent ::CreateDescriptor ());
96
+ m_application.get ()->RegisterComponentDescriptor (KeepThisComponent ::CreateDescriptor ());
97
97
m_application.get ()->RegisterComponentDescriptor (RemoveThisComponent::CreateDescriptor ());
98
98
m_application.get ()->RegisterComponentDescriptor (DependentComponent::CreateDescriptor ());
99
99
@@ -155,7 +155,7 @@ namespace UnitTest
155
155
PrefabDocument document (" testPrefab" );
156
156
AzToolsFramework::Prefab::PrefabDom prefabDom;
157
157
AZStd::vector<AZ::Entity*> entities;
158
- entities.emplace_back (CreateSourceEntity (EntityName, {Uuid_RemoveThisComponent, Uuid_ServerComponent }));
158
+ entities.emplace_back (CreateSourceEntity (EntityName, { Uuid_RemoveThisComponent, Uuid_KeepThisComponent }));
159
159
ConvertEntitiesToPrefab (entities, prefabDom);
160
160
161
161
ASSERT_TRUE (document.SetPrefabDom (AZStd::move (prefabDom)));
@@ -171,7 +171,7 @@ namespace UnitTest
171
171
if (entity->GetName () == EntityName)
172
172
{
173
173
EXPECT_NE (entity->FindComponent (Uuid_RemoveThisComponent), nullptr );
174
- EXPECT_NE (entity->FindComponent (Uuid_ServerComponent ), nullptr );
174
+ EXPECT_NE (entity->FindComponent (Uuid_KeepThisComponent ), nullptr );
175
175
}
176
176
return true ;
177
177
}
@@ -194,7 +194,7 @@ namespace UnitTest
194
194
if (entity->GetName () == EntityName)
195
195
{
196
196
EXPECT_EQ (entity->FindComponent (Uuid_RemoveThisComponent), nullptr );
197
- EXPECT_NE (entity->FindComponent (Uuid_ServerComponent ), nullptr );
197
+ EXPECT_NE (entity->FindComponent (Uuid_KeepThisComponent ), nullptr );
198
198
}
199
199
return true ;
200
200
}
@@ -215,7 +215,7 @@ namespace UnitTest
215
215
PrefabDocument document (" testPrefab" );
216
216
AzToolsFramework::Prefab::PrefabDom prefabDom;
217
217
AZStd::vector<AZ::Entity*> entities;
218
- entities.emplace_back (CreateSourceEntity (EntityName, { Uuid_RemoveThisComponent, Uuid_ServerComponent , Uuid_DependentComponent }));
218
+ entities.emplace_back (CreateSourceEntity (EntityName, { Uuid_RemoveThisComponent, Uuid_KeepThisComponent , Uuid_DependentComponent }));
219
219
ConvertEntitiesToPrefab (entities, prefabDom);
220
220
221
221
ASSERT_TRUE (document.SetPrefabDom (AZStd::move (prefabDom)));
0 commit comments