use of org.n52.janmayen.i18n.LocalizedString in project arctic-sea by 52North.
the class SettingValueFactoryTest method testMultilingualStringParsing.
@Test
public void testMultilingualStringParsing() {
String s = "{\"de\":\"Hallo\",\"en\":\"Hello\"}";
MultilingualString ms = SettingValueFactory.decodeMultiLingualStringValue(s);
errors.checkThat(ms, is(notNullValue()));
errors.checkThat(ms.getLocalization(Locale.ENGLISH), is(Optional.of(new LocalizedString(Locale.ENGLISH, "Hello"))));
errors.checkThat(ms.getLocalization(Locale.GERMAN), is(Optional.of(new LocalizedString(Locale.GERMAN, "Hallo"))));
}
Aggregations