Search in sources :

Example 1 with TestExplanation2

use of eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation2 in project hale by halestudio.

the class MarkdownCellExplanationTest method testExplanation.

@Test
public void testExplanation() {
    TestExplanation2 exp = new TestExplanation2();
    Cell cell = createTestCell();
    String expected = // 
    "Source 'source1Type'\n" + // 
    "Source 'source1Type'\n" + // 
    "Target 'target1Type'\n" + // 
    "test 1\n" + // 
    "test 2\n" + "pattern 3";
    String expl = exp.getExplanation(cell, null, Locale.getDefault());
    org.junit.Assert.assertNotNull(expl);
    assertEquals(expected, expl);
}
Also used : TestExplanation2(eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation2) Cell(eu.esdihumboldt.hale.common.align.model.Cell) DefaultCell(eu.esdihumboldt.hale.common.align.model.impl.DefaultCell) MutableCell(eu.esdihumboldt.hale.common.align.model.MutableCell) Test(org.junit.Test)

Example 2 with TestExplanation2

use of eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation2 in project hale by halestudio.

the class MarkdownCellExplanationTest method testLocales2.

@Test
public void testLocales2() {
    TestExplanation2 exp = new TestExplanation2();
    Set<Locale> locales = new HashSet<>();
    Iterables.addAll(locales, exp.getSupportedLocales());
    assertTrue(locales.contains(Locale.ENGLISH));
    assertEquals(1, locales.size());
}
Also used : Locale(java.util.Locale) TestExplanation2(eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation2) HashSet(java.util.HashSet) Test(org.junit.Test)

Aggregations

TestExplanation2 (eu.esdihumboldt.hale.common.align.model.impl.mdexpl.test.TestExplanation2)2 Test (org.junit.Test)2 Cell (eu.esdihumboldt.hale.common.align.model.Cell)1 MutableCell (eu.esdihumboldt.hale.common.align.model.MutableCell)1 DefaultCell (eu.esdihumboldt.hale.common.align.model.impl.DefaultCell)1 HashSet (java.util.HashSet)1 Locale (java.util.Locale)1