use of com.github.jknack.handlebars.Options in project ddf by codice.
the class DescriptionTemplateHelperTest method testNoThumbnailHasThumbnail.
@Test
public void testNoThumbnailHasThumbnail() throws IOException {
String ifOption = "if";
String elseOption = "else";
Metacard metacard = new MetacardImpl();
Options mockOptions = mock(Options.class);
when(mockOptions.fn()).thenReturn(ifOption);
when(mockOptions.inverse()).thenReturn(elseOption);
String result = helper.hasThumbnail(metacard, mockOptions).toString();
assertEquals(elseOption, result);
}
Aggregations