use of org.terasology.assets.format.AssetDataFile in project Terasology by MovingBlocks.
the class TranslationFormatTests method testDataGenGerman.
@Test
public void testDataGenGerman() throws IOException, InvalidAssetFilenameException {
byte[] resource = createSimpleTranslationFile().getBytes(StandardCharsets.UTF_8);
AssetDataFile assetDataFile = mockAssetDataFile("menu_de-DE.lang", resource);
ResourceUrn urn = createUrnFromFile(format, assetDataFile);
TranslationData data = format.load(urn, Collections.singletonList(assetDataFile));
Assert.assertEquals("Einzelspieler", data.getTranslations().get("engine:mainMenuScreen#singleplayer#text"));
}
Aggregations