use of eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation1 in project hale by halestudio.
the class MarkdownCellExplanationTest method testTemplate.
/**
* Test if different templates for different languages are retrieved
* properly.
*/
@Test
public void testTemplate() {
TestExplanation1 exp = new TestExplanation1();
Optional<Template> english = exp.getTemplate(TestExplanation1.class, Locale.ENGLISH);
assertTrue(english.isPresent());
assertEquals("I'm an English man", english.get().make().toString());
Optional<Template> german = exp.getTemplate(TestExplanation1.class, Locale.GERMAN);
assertTrue(german.isPresent());
assertEquals("Ich bin Deutscher", german.get().make().toString());
Optional<Template> germany = exp.getTemplate(TestExplanation1.class, Locale.GERMANY);
assertTrue(germany.isPresent());
assertEquals("Ich bin Deutscher", germany.get().make().toString());
}
use of eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation1 in project hale by halestudio.
the class MarkdownCellExplanationTest method testLocales1.
@Test
public void testLocales1() {
TestExplanation1 exp = new TestExplanation1();
Set<Locale> locales = new HashSet<>();
Iterables.addAll(locales, exp.getSupportedLocales());
assertTrue(locales.contains(Locale.ENGLISH));
assertTrue(locales.contains(Locale.GERMAN));
assertEquals(2, locales.size());
}
Aggregations