use of com.b3dgs.lionengine.Origin in project lionengine by b3dgs.
the class OriginConfigTest method testExportsImports.
/**
* Test exports imports.
*/
@Test
void testExportsImports() {
final Origin origin = Origin.MIDDLE;
final Xml root = new Xml("test");
root.add(OriginConfig.exports(origin));
final Media media = Medias.create("origin.xml");
root.save(media);
assertEquals(origin, OriginConfig.imports(new Xml(media)));
assertEquals(origin, OriginConfig.imports(new Setup(media)));
assertEquals(origin, OriginConfig.imports(new Configurer(media)));
assertTrue(media.getFile().delete());
}