Search in sources :

Example 41 with StringComponent

use of org.terasology.entitySystem.stubs.StringComponent in project Terasology by MovingBlocks.

the class ComponentMetadataTest method testStaticFieldsIgnored.

@Test
public void testStaticFieldsIgnored() {
    EntitySystemLibrary entitySystemLibrary = new EntitySystemLibrary(context, new TypeSerializationLibrary(reflectFactory, copyStrategies));
    ComponentLibrary lib = entitySystemLibrary.getComponentLibrary();
    lib.register(new SimpleUri("unittest:string"), StringComponent.class);
    ComponentMetadata<StringComponent> metadata = lib.getMetadata(StringComponent.class);
    assertNull(metadata.getField("STATIC_VALUE"));
}
Also used : StringComponent(org.terasology.entitySystem.stubs.StringComponent) SimpleUri(org.terasology.engine.SimpleUri) TypeSerializationLibrary(org.terasology.persistence.typeHandling.TypeSerializationLibrary) Test(org.junit.Test)

Aggregations

StringComponent (org.terasology.entitySystem.stubs.StringComponent)41 Test (org.junit.Test)38 EntityRef (org.terasology.entitySystem.entity.EntityRef)22 IntegerComponent (org.terasology.entitySystem.stubs.IntegerComponent)8 EntityData (org.terasology.protobuf.EntityData)8 EventSystem (org.terasology.entitySystem.event.internal.EventSystem)5 ResourceUrn (org.terasology.assets.ResourceUrn)4 PrefabData (org.terasology.entitySystem.prefab.PrefabData)4 Prefab (org.terasology.entitySystem.prefab.Prefab)3 PojoPrefab (org.terasology.entitySystem.prefab.internal.PojoPrefab)3 Before (org.junit.Before)2 SimpleUri (org.terasology.engine.SimpleUri)2 Component (org.terasology.entitySystem.Component)2 EngineEntityManager (org.terasology.entitySystem.entity.internal.EngineEntityManager)2 GetterSetterComponent (org.terasology.entitySystem.stubs.GetterSetterComponent)2 Vector3i (org.terasology.math.geom.Vector3i)2 NetworkSystem (org.terasology.network.NetworkSystem)2 Map (java.util.Map)1 EntityRefComponent (org.terasology.entitySystem.stubs.EntityRefComponent)1 StorageManager (org.terasology.persistence.StorageManager)1