Changeset 7076 in josm for trunk/test/unit/org/openstreetmap
- Timestamp:
- 2014-05-08T02:54:38+02:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
r7030 r7076 6 6 7 7 import java.io.BufferedReader; 8 import java.io.IOException; 8 9 import java.net.URL; 9 10 import java.util.Arrays; 10 import java.util.Locale;11 11 12 12 import org.junit.Assert; … … 76 76 } 77 77 78 /** 79 * Test of {@link Utils#openURLReaderAndDecompress} method with Gzip compression. 80 * @throws IOException if any I/O error occurs 81 */ 78 82 @Test 79 public void testOpenUrlGzip() throws Exception {83 public void testOpenUrlGzip() throws IOException { 80 84 Main.initApplicationPreferences(); 81 85 try (BufferedReader x = Utils.openURLReaderAndDecompress(new URL("https://www.openstreetmap.org/trace/1613906/data"), true)) { … … 84 88 } 85 89 90 /** 91 * Test of {@link Utils#openURLReaderAndDecompress} method with Bzip compression. 92 * @throws IOException if any I/O error occurs 93 */ 86 94 @Test 87 public void testOpenUrlBzip() throws Exception {95 public void testOpenUrlBzip() throws IOException { 88 96 Main.initApplicationPreferences(); 89 97 try (BufferedReader x = Utils.openURLReaderAndDecompress(new URL("https://www.openstreetmap.org/trace/785544/data"), true)) { … … 92 100 } 93 101 102 /** 103 * Test of {@link Utils#getPositionListString} method. 104 */ 94 105 @Test 95 public void testPositionListString() throws Exception{106 public void testPositionListString() { 96 107 assertThat(Utils.getPositionListString(Arrays.asList(1)), is("1")); 97 108 assertThat(Utils.getPositionListString(Arrays.asList(1, 2, 3)), is("1-3")); … … 101 112 } 102 113 114 /** 115 * Test of {@link Utils#getDurationString} method. 116 */ 103 117 @Test 104 public void testDurationString() throws Exception{105 Locale.setDefault(Locale.ENGLISH);118 public void testDurationString() { 119 I18n.set("en"); 106 120 assertThat(Utils.getDurationString(123), is("123 ms")); 107 121 assertThat(Utils.getDurationString(1234), is("1.2 s"));
Note:
See TracChangeset
for help on using the changeset viewer.