Changeset 6421 in josm for trunk/test
- Timestamp:
- 2013-11-28T23:33:10+01:00 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/tools/UtilsTest.java
r6410 r6421 4 4 import org.junit.Assert; 5 5 import org.junit.Test; 6 import org.openstreetmap.josm.Main; 7 import org.openstreetmap.josm.data.Preferences; 8 9 import java.io.BufferedReader; 10 import java.net.URL; 6 11 7 12 /** … … 66 71 Assert.assertEquals("fedc", Utils.toHexString(new byte[]{(byte) 0xfe, (byte) 0xdc})); 67 72 } 73 74 @Test 75 public void testOpenUrlGzip() throws Exception { 76 Main.pref = new Preferences(); 77 final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/1613906/data"), true); 78 Assert.assertTrue(x.readLine().startsWith("<?xml version=")); 79 x.close(); 80 } 81 82 @Test 83 public void testOpenUrlBzip() throws Exception { 84 Main.pref = new Preferences(); 85 final BufferedReader x = Utils.openURLReaderAndDecompress(new URL("http://www.openstreetmap.org/trace/785544/data"), true); 86 Assert.assertTrue(x.readLine().startsWith("<?xml version=")); 87 x.close(); 88 } 68 89 }
Note:
See TracChangeset
for help on using the changeset viewer.