use of nl.knaw.huygens.timbuctoo.model.LocationNames in project timbuctoo by HuygensING.
the class DefaultDefaultLocationNamePropertyParserTest method parseReturnsOutputOfPlaceNameGetDefaultName.
@Test
public void parseReturnsOutputOfPlaceNameGetDefaultName() throws JsonProcessingException {
LocationNames locationNames = new LocationNames("defLang");
locationNames.addCountryName("defLang", "Nederland");
String value = instance.parse(new ObjectMapper().writeValueAsString(locationNames));
assertThat(value, is(locationNames.getDefaultName()));
}
use of nl.knaw.huygens.timbuctoo.model.LocationNames in project timbuctoo by HuygensING.
the class DefaultDefaultLocationNamePropertyParserTest method parseForSortReturnsOutputOfPlaceNameGetDefaultName.
@Test
public void parseForSortReturnsOutputOfPlaceNameGetDefaultName() throws JsonProcessingException {
LocationNames locationNames = new LocationNames("defLang");
locationNames.addCountryName("defLang", "Nederland");
Object value = instance.parseForSort(new ObjectMapper().writeValueAsString(locationNames));
assertThat(value, is(locationNames.getDefaultName()));
}
use of nl.knaw.huygens.timbuctoo.model.LocationNames in project timbuctoo by HuygensING.
the class DefaultDefaultLocationNamePropertyParserTest method parseForSortRemovesTheTrailingWhitespaces.
@Test
public void parseForSortRemovesTheTrailingWhitespaces() throws JsonProcessingException {
LocationNames locationNames = new LocationNames("defLang");
locationNames.addCountryName("defLang", "Nederland ");
Object value = instance.parseForSort(new ObjectMapper().writeValueAsString(locationNames));
assertThat(value, is("Nederland"));
}
use of nl.knaw.huygens.timbuctoo.model.LocationNames in project timbuctoo by HuygensING.
the class DefaultDefaultLocationNamePropertyParserTest method parseForSortRemovesTheLeadingWhitespaces.
@Test
public void parseForSortRemovesTheLeadingWhitespaces() throws JsonProcessingException {
LocationNames locationNames = new LocationNames("defLang");
locationNames.addCountryName("defLang", " Nederland");
Object value = instance.parseForSort(new ObjectMapper().writeValueAsString(locationNames));
assertThat(value, is("Nederland"));
}
Aggregations