@@ -0,0 +1,2428 @@
+/*%0A * Copyright 2015-2017 52%C2%B0North Initiative for Geospatial Open Source%0A * Software GmbH%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *    http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0Apackage org.n52.iceland.i18n;%0A%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.hamcrest.Matchers.notNullValue;%0A%0Aimport java.util.Locale;%0A%0Aimport org.junit.Ignore;%0Aimport org.junit.Rule;%0Aimport org.junit.Test;%0Aimport org.junit.rules.ErrorCollector;%0Aimport org.junit.rules.ExpectedException;%0A%0Aimport org.n52.iceland.i18n.I18NSerializer;%0Aimport org.n52.janmayen.i18n.MultilingualString;%0A%0A/**%0A * TODO JavaDoc%0A *%0A * @author Christian Autermann%0A */%0Apublic class I18NSerializerTest %7B%0A%0A    @Rule%0A    public final ErrorCollector errors = new ErrorCollector();%0A    @Rule%0A    public final ExpectedException thrown = ExpectedException.none();%0A%0A    @Test@Ignore%0A    public void testSingle() %7B%0A        test(new MultilingualString().addLocalization(Locale.ENGLISH, %22text%22));%0A        test(new MultilingualString()%0A                .addLocalization(Locale.ENGLISH, %22text!;%5C%22)=?%C2%A7%22));%0A    %7D%0A%0A    @Test@Ignore%0A    public void testMultiple() %7B%0A        test(new MultilingualString()%0A                .addLocalization(Locale.ENGLISH, %22text!;%5C%22)=?%C2%A7%22)%0A                .addLocalization(Locale.CANADA_FRENCH, %22text!;%5C%22)=?%C2%A7%22)%0A                .addLocalization(Locale.TRADITIONAL_CHINESE, %22text!;%5C%22)=?%C2%A7%22)%0A                .addLocalization(Locale.GERMANY, %22text!;%5C%22)=?%C2%A7%22)%0A                .addLocalization(Locale.KOREAN, %22text!;%5C%22)=?%C2%A7%22));%0A    %7D%0A%0A    private void test(MultilingualString string) %7B%0A        errors.checkThat(string, is(notNullValue()));%0A        String encoded = new I18NSerializer().encode(string);%0A        System.out.println(encoded);%0A        errors.checkThat(encoded.isEmpty(), is(string.isEmpty()));%0A        MultilingualString decoded = new I18NSerializer().decode(encoded);%0A        errors.checkThat(decoded, is(equalTo(string)));%0A    %7D%0A%0A%7D%0A

Add i18n serializer test