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


Ignore:
Timestamp:
2014-09-09T08:58:06+02:00 (10 years ago)
Author:
Don-vip
Message:

see #10494 - Update opening_hours.js unit test

File:
1 edited

Legend:

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

    r7081 r7515  
    6464        final String key = "opening_hours";
    6565        final List<OpeningHourTest.OpeningHoursTestError> errors = OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo-Tue");
    66         assertThat(errors, hasSize(1));
     66        assertThat(errors, hasSize(2));
    6767        assertThat(errors.get(0).getMessage(), is(key + " - Mo-Tue <--- (Please use the abbreviation \"Tu\" for \"tue\".)"));
    6868        assertThat(errors.get(0).getSeverity(), is(Severity.WARNING));
     69        assertThat(errors.get(1).getMessage(), is(key + " - Mo-Tue <--- (This rule is not very explicit because there is no time selector being used."+
     70                " Please add a time selector to this rule or use a comment to make it more explicit.)"));
     71        assertThat(errors.get(1).getSeverity(), is(Severity.WARNING));
    6972    }
    7073
     
    136139        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getSeverity(), is(Severity.WARNING));
    137140        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getMessage(),
    138                 is(key + " - Mo,Tu 04-17 <--- (Time range without minutes specified. Not very explicit! Please use this syntax instead e.g. \"12:00-14:00\".)"));
     141                is(key + " - Mo,Tu 04-17 <--- (Time range without minutes specified. Not very explicit! Please use this syntax instead \"04:00-17:00\".)"));
    139142        assertThat(OPENING_HOUR_TEST.checkOpeningHourSyntax(key, "Mo,Tu 04-17").get(0).getPrettifiedValue(), is("Mo,Tu 04:00-17:00"));
    140143    }
Note: See TracChangeset for help on using the changeset viewer.