use of org.terasology.engine.persistence.typeHandling.extensionTypes.AssetTypeHandler in project Terasology by MovingBlocks.
the class AssetTypeHandlerFactoryTest method testCreate.
@Test
public void testCreate() {
TypeHandlerFactory factory = new AssetTypeHandlerFactory();
List<TypeInfo<? extends Asset>> typesToTest = Lists.newArrayList(TypeInfo.of(Texture.class), TypeInfo.of(UIElement.class), TypeInfo.of(StaticSound.class), TypeInfo.of(StreamingSound.class));
for (TypeInfo<? extends Asset> typeInfo : typesToTest) {
Optional<? extends TypeHandler<? extends Asset>> typeHandler = factory.create(typeInfo, null);
assertTrue(typeHandler.isPresent());
assertTrue(typeHandler.get() instanceof AssetTypeHandler);
}
}
Aggregations