Changeset 6377 in josm for trunk/test
- Timestamp:
- 2013-11-07T22:14:53+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/data/validation/tests/OpeningHourTestTest.java
r6376 r6377 6 6 import org.openstreetmap.josm.data.Preferences; 7 7 import org.openstreetmap.josm.data.validation.Severity; 8 import org.openstreetmap.josm.data.validation.TestError;9 8 10 9 import java.util.List; … … 34 33 @Test 35 34 public void testCheckOpeningHourSyntax2() throws Exception { 36 final List< TestError> errors = OPENING_HOUR_TEST.checkOpeningHourSyntax("Mo-Tue");35 final List<OpeningHourTest.OpeningHoursTestError> errors = OPENING_HOUR_TEST.checkOpeningHourSyntax("Mo-Tue"); 37 36 assertThat(errors.size(), is(1)); 38 37 assertThat(errors.get(0).getMessage(), is("Mo-Tue <--- (Please use the abbreviation \"Tu\" for \"tue\".)")); … … 42 41 @Test 43 42 public void testCheckOpeningHourSyntax3() throws Exception { 44 final List< TestError> errors = OPENING_HOUR_TEST.checkOpeningHourSyntax("Sa-Su 10.00-20.00");43 final List<OpeningHourTest.OpeningHoursTestError> errors = OPENING_HOUR_TEST.checkOpeningHourSyntax("Sa-Su 10.00-20.00"); 45 44 assertThat(errors.size(), is(2)); 46 45 assertThat(errors.get(0).getMessage(), is("Sa-Su 10. <--- (Please use \":\" as hour/minute-separator)")); 47 46 assertThat(errors.get(0).getSeverity(), is(Severity.WARNING)); 47 assertThat(errors.get(0).getPrettifiedValue(), is("Sa-Su 10:00-20:00")); 48 48 assertThat(errors.get(1).getMessage(), is("Sa-Su 10.00-20. <--- (Please use \":\" as hour/minute-separator)")); 49 49 assertThat(errors.get(1).getSeverity(), is(Severity.WARNING)); … … 62 62 assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax("badtext").get(0).getMessage(), 63 63 is("opening_hours - ba <--- (Unexpected token: \"b\" This means that the syntax is not valid at that point or it is currently not supported.)")); 64 assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax("5.00 p.m-11.00 p.m").size(), is(1)); 65 assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax("5.00 p.m-11.00 p.m").get(0).getMessage(), 66 is("opening_hours - 5.00 p <--- (hyphen (-) or open end (+) in time range expected. For working with points in time, the mode for opening_hours.js has to be altered. Maybe wrong tag?)")); 64 67 } 65 68
Note:
See TracChangeset
for help on using the changeset viewer.