Search in sources :

Example 1 with PersistedString

use of org.terasology.persistence.typeHandling.inMemory.PersistedString in project Terasology by MovingBlocks.

the class ColorTypeHandlerTest method testDeserializeHex.

@Test
public void testDeserializeHex() {
    PersistedData data = new PersistedString("DEADBEEF");
    Color color = handler.deserialize(data, deserializationContext);
    Assert.assertEquals(0xDEADBEEF, color.rgba());
}
Also used : PersistedString(org.terasology.persistence.typeHandling.inMemory.PersistedString) Color(org.terasology.rendering.nui.Color) PersistedData(org.terasology.persistence.typeHandling.PersistedData) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)1 PersistedData (org.terasology.persistence.typeHandling.PersistedData)1 PersistedString (org.terasology.persistence.typeHandling.inMemory.PersistedString)1 Color (org.terasology.rendering.nui.Color)1