Changeset 10487 in josm for trunk/test/unit


Ignore:
Timestamp:
2016-06-25T11:15:22+02:00 (8 years ago)
Author:
Don-vip
Message:

fix #13048 - Make ExceptionUtilTest respect time zone (patch by michael2402) - gsoc-core

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/unit/org/openstreetmap/josm/tools/ExceptionUtilTest.java

    r9669 r10487  
    99import java.net.URL;
    1010import java.net.UnknownHostException;
     11import java.util.TimeZone;
    1112
    1213import org.junit.BeforeClass;
     
    2223import org.openstreetmap.josm.io.auth.CredentialsManager;
    2324import org.openstreetmap.josm.tools.date.DateUtils;
     25import org.openstreetmap.josm.tools.date.DateUtilsTest;
    2426
    2527/**
     
    124126        assertEquals("<html>Closing of changeset <strong>1</strong> failed <br>because it has already been closed.",
    125127                ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at xxx", "")));
     128        assertEquals("<html>Closing of changeset <strong>1</strong> failed<br> because it has already been closed on 2016-01-01 12:34:56.",
     129                ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at 2016-01-01 12:34:56 UTC", "")));
     130        DateUtilsTest.setTimeZone(TimeZone.getTimeZone("Europe/Berlin"));
     131        TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
    126132        assertEquals("<html>Closing of changeset <strong>1</strong> failed<br> because it has already been closed on 2016-01-01 13:34:56.",
    127133                ExceptionUtil.explainConflict(new OsmApiException(code, "The changeset 1 was closed at 2016-01-01 12:34:56 UTC", "")));
Note: See TracChangeset for help on using the changeset viewer.