Changeset 10103 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2016-04-03T15:42:30+02:00 (9 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/gui/help/HelpBrowserTest.java
r9669 r10103 15 15 public class HelpBrowserTest { 16 16 17 privatestatic final String URL_1 = "https://josm.openstreetmap.de/wiki/Help";18 privatestatic final String URL_2 = "https://josm.openstreetmap.de/wiki/Introduction";19 privatestatic final String URL_3 = "https://josm.openstreetmap.de/javadoc";17 static final String URL_1 = "https://josm.openstreetmap.de/wiki/Help"; 18 static final String URL_2 = "https://josm.openstreetmap.de/wiki/Introduction"; 19 static final String URL_3 = "https://josm.openstreetmap.de/javadoc"; 20 20 21 21 /** -
trunk/test/unit/org/openstreetmap/josm/gui/preferences/audio/AudioPreferenceTest.java
r9973 r10103 7 7 import org.junit.Test; 8 8 import org.openstreetmap.josm.JOSMFixture; 9 import org.openstreetmap.josm.Main; 9 10 import org.openstreetmap.josm.gui.preferences.PreferencesTestUtils; 10 11 … … 35 36 @Test 36 37 public void testAddGui() { 38 Main.pref.put("audio.menuinvisible", true); 39 PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null); 40 Main.pref.put("audio.menuinvisible", false); 37 41 PreferencesTestUtils.doTestPreferenceSettingAddGui(new AudioPreference.Factory(), null); 38 42 } -
trunk/test/unit/org/openstreetmap/josm/tools/date/DateUtilsTest.java
r9739 r10103 4 4 import static org.junit.Assert.assertEquals; 5 5 6 import java.text.DateFormat; 6 7 import java.util.Date; 7 8 import java.util.TimeZone; 8 9 10 import org.junit.BeforeClass; 9 11 import org.junit.Test; 12 import org.openstreetmap.josm.JOSMFixture; 10 13 import org.openstreetmap.josm.tools.UncheckedParseException; 11 14 … … 14 17 */ 15 18 public class DateUtilsTest { 19 20 /** 21 * Setup test. 22 */ 23 @BeforeClass 24 public static void setUp() { 25 JOSMFixture.createUnitTestFixture().init(); 26 } 16 27 17 28 /** … … 86 97 assertEquals(1453694709400L, DateUtils.fromString("2016-01-25T04:05:09.400Z").getTime()); 87 98 } 99 100 /** 101 * Unit test of {@link DateUtils#fromTimestamp} method. 102 */ 103 @Test 104 public void testFromTimestamp() { 105 assertEquals("1970-01-01T00:00:00Z", DateUtils.fromTimestamp(0)); 106 assertEquals("2001-09-09T01:46:40Z", DateUtils.fromTimestamp(1000000000)); 107 assertEquals("2038-01-19T03:14:07Z", DateUtils.fromTimestamp(Integer.MAX_VALUE)); 108 } 109 110 /** 111 * Unit test of {@link DateUtils#formatTime} method. 112 */ 113 @Test 114 public void testFormatTime() { 115 assertEquals("1:00 AM", DateUtils.formatTime(new Date(123), DateFormat.SHORT)); 116 assertEquals("1:00:00 AM CET", DateUtils.formatTime(new Date(123), DateFormat.LONG)); 117 } 88 118 }
Note:
See TracChangeset
for help on using the changeset viewer.