Ignore:
Timestamp:
2021-03-19T19:52:15+01:00 (4 years ago)
Author:
simon04
Message:

see #20626 - OpeningHoursParser: report multiple parse exceptions

File:
1 edited

Legend:

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

    r17590 r17591  
    9090                checkOpeningHourSyntax(key, value, Locale.ENGLISH).get(0).getDescription());
    9191        value = "Mon-Thu 12-18";
    92         assertEquals("Wochentag mit 3 Buchstaben in Zeile 1, Spalte 4",
     92        assertEquals("Wochentag mit 3 Buchstaben in Zeile 1, Spalte 4; Wochentag mit 3 Buchstaben in Zeile 1, Spalte 9; Stunden ohne Minuten",
    9393                checkOpeningHourSyntax(key, value, Locale.GERMAN).get(0).getDescription());
    94         assertEquals("Three character weekday at line 1, column 4",
     94        assertEquals("Three character weekday at line 1, column 4; Three character weekday at line 1, column 9; Hours without minutes",
    9595                checkOpeningHourSyntax(key, value, Locale.ENGLISH).get(0).getDescription());
    9696    }
     
    118118        assertThat(errors, hasSize(1));
    119119        assertFixEquals("Sa-Su 10:00-20:00", errors.get(0));
    120         assertEquals("Invalid minutes at line 1, column 12", errors.get(0).getDescription());
     120        assertEquals("Invalid minutes at line 1, column 12; Invalid minutes at line 1, column 17", errors.get(0).getDescription());
    121121        assertEquals(Severity.WARNING, errors.get(0).getSeverity());
    122122    }
     
    145145                checkOpeningHourSyntax(key, "badtext").get(0).getDescription().trim());
    146146        assertThat(checkOpeningHourSyntax(key, "5.00 p.m-11.00 p.m"), hasSize(1));
    147         assertEquals(String.format("Encountered:  <UNEXPECTED_CHAR> \"p \" at line 1, column 3%nWas expecting: <EOF>"),
     147        assertEquals(String.format("Encountered:  <UNEXPECTED_CHAR> \"p \" at line 1, column 3%nWas expecting: <EOF>; " +
     148                        "Encountered:  <UNEXPECTED_CHAR> \"p \" at line 1, column 13%n" +
     149                        "Was expecting: <EOF>"),
    148150                checkOpeningHourSyntax(key, "5.00 p.m-11.00 p.m").get(0).getDescription());
    149151    }
Note: See TracChangeset for help on using the changeset viewer.