Changeset 8680 in josm for trunk/test/unit/org/openstreetmap


Ignore:
Timestamp:
2015-08-22T21:32:45+02:00 (9 years ago)
Author:
simon04
Message:

fix #11755 - Update version of opening_hours.js to 3.3.0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java

    r8509 r8680  
    66import static org.hamcrest.CoreMatchers.is;
    77import static org.hamcrest.CoreMatchers.not;
     8import static org.junit.Assert.assertFalse;
    89import static org.junit.Assert.assertThat;
     10import static org.junit.Assert.assertTrue;
    911
    1012import java.util.Arrays;
     
    5052        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "24/7"), isEmpty());
    5153        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr 08:30-20:00"), isEmpty());
     54        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Fr sunrise-sunset"), isEmpty());
    5255        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "09:00-21:00"), isEmpty());
    5356        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00,04:00-sunrise; Fr-Sa sunset-sunrise"), isEmpty());
     
    5760        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Su-Th sunset-24:00, 04:00-sunrise; Fr-Sa sunset-sunrise")
    5861                .get(0).getPrettifiedValue(), is("Su-Th sunset-24:00,04:00-sunrise; Fr-Sa sunset-sunrise"));
     62    }
     63
     64    @Test
     65    public void testI18n() throws Exception {
     66        assertTrue(OPENING_HOUR_TEST.checkOpeningHourSyntax("opening_hours", ".", OpeningHourTest.CheckMode.POINTS_IN_TIME, false, "de")
     67                .get(0).toString().contains("Unerwartetes Zeichen"));
     68        assertFalse(OPENING_HOUR_TEST.checkOpeningHourSyntax("opening_hours", ".", OpeningHourTest.CheckMode.POINTS_IN_TIME, false, "en")
     69                .get(0).toString().contains("Unerwartetes Zeichen"));
    5970    }
    6071
Note: See TracChangeset for help on using the changeset viewer.