Changeset 9605 in josm for trunk/test/unit
- Timestamp:
- 2016-01-24T02:40:28+01:00 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java
r9599 r9605 46 46 host = new URL(serverUrl).getHost(); 47 47 user = CredentialsManager.getInstance().getUsername(); 48 DateUtils.PROP_ISO_DATES.put(Boolean.TRUE); 48 49 } 49 50 … … 95 96 @Test 96 97 public void testExplainChangesetClosedException() { 97 // This test relies on the fact that CLDR is not the default local provider (see I18n.init)98 assertEquals("JRE,CLDR", System.getProperty("java.locale.providers"));99 100 98 assertEquals("<html>Failed to upload to changeset <strong>0</strong><br>because it has already been closed on ?.", 101 99 ExceptionUtil.explainChangesetClosedException(new ChangesetClosedException(""))); 102 100 103 assertEquals("<html>Failed to upload to changeset <strong>1</strong><br>because it has already been closed on Jan 1, 2016 12:00:00 AM.",101 assertEquals("<html>Failed to upload to changeset <strong>1</strong><br>because it has already been closed on 2016-01-01 00:00:00.", 104 102 ExceptionUtil.explainChangesetClosedException(new ChangesetClosedException(1, DateUtils.fromString("2016-01-01"), null))); 105 103 } … … 119 117 @Test 120 118 public void testExplainConflict() { 121 // This test relies on the fact that CLDR is not the default local provider (see I18n.init)122 assertEquals("JRE,CLDR", System.getProperty("java.locale.providers"));123 124 119 int code = HttpURLConnection.HTTP_CONFLICT; 125 120 assertEquals("<html>The server reported that it has detected a conflict.</html>", … … 129 124 assertEquals("<html>Closing of changeset <strong>1</strong> failed <br>because it has already been closed.", 130 125 ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at xxx", ""))); 131 assertEquals("<html>Closing of changeset <strong>1</strong> failed<br> because it has already been closed on Jan 1, 2016 1:34:56 PM.",126 assertEquals("<html>Closing of changeset <strong>1</strong> failed<br> because it has already been closed on 2016-01-01 13:34:56.", 132 127 ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at 2016-01-01 12:34:56 UTC", ""))); 133 128 }
Note:
See TracChangeset
for help on using the changeset viewer.