Changeset 8857 in josm for trunk/test/unit/org/openstreetmap/josm/io/remotecontrol
- Timestamp:
- 2015-10-11T17:28:19+02:00 (7 years ago)
- Location:
- trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/ImportHandlerTest.java
r8624 r8857 7 7 import org.junit.Test; 8 8 9 /** 10 * Unit tests of {@link ImportHandler} class. 11 */ 9 12 public class ImportHandlerTest { 10 13 -
trunk/test/unit/org/openstreetmap/josm/io/remotecontrol/handler/RequestHandlerTest.java
r8624 r8857 2 2 package org.openstreetmap.josm.io.remotecontrol.handler; 3 3 4 import static org.hamcrest.CoreMatchers.is; 5 import static org.junit.Assert.assertThat; 4 import static org.junit.Assert.assertEquals; 6 5 7 6 import java.util.Collections; … … 12 11 import org.openstreetmap.josm.io.remotecontrol.PermissionPrefWithDefault; 13 12 13 /** 14 * Unit tests of {@link RequestHandler} class. 15 */ 14 16 public class RequestHandlerTest { 15 17 … … 48 50 expected.put("query", "a"); 49 51 expected.put("b", "=c"); 50 assertThat(getRequestParameter("http://example.com/?query=a&b==c"), 51 is(expected)); 52 assertEquals(expected, getRequestParameter("http://example.com/?query=a&b==c")); 52 53 } 53 54 54 55 @Test 55 56 public void testRequestParameter12() { 56 assert That(getRequestParameter("http://example.com/?query=a%26b==c"),57 is(Collections.singletonMap("query", "a&b==c")));57 assertEquals(Collections.singletonMap("query", "a&b==c"), 58 getRequestParameter("http://example.com/?query=a%26b==c")); 58 59 } 59 60 60 61 @Test 61 62 public void testRequestParameter3() { 62 assert That(getRequestParameter("http://example.com/blue+light%20blue?blue%2Blight+blue").keySet(),63 is((Collections.singleton("blue+light blue"))));63 assertEquals(Collections.singleton("blue+light blue"), 64 getRequestParameter("http://example.com/blue+light%20blue?blue%2Blight+blue").keySet()); 64 65 } 65 66 … … 70 71 @Test 71 72 public void testRequestParameter4() { 72 assert That(getRequestParameter(73 assertEquals(Collections.singletonMap("/?:@-._~!$'()* ,;", "/?:@-._~!$'()* ,;=="), getRequestParameter( 73 74 // CHECKSTYLE.OFF: LineLength 74 "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$'()*+,;=/?:@-._~!$'()*+,;==#/?:@-._~!$&'()*+,;=") ,75 "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$'()*+,;=/?:@-._~!$'()*+,;==#/?:@-._~!$&'()*+,;=")); 75 76 // CHECKSTYLE.ON: LineLength 76 is(Collections.singletonMap("/?:@-._~!$'()* ,;", "/?:@-._~!$'()* ,;==")));77 77 } 78 78 … … 82 82 expected.put("space", " "); 83 83 expected.put("tab", "\t"); 84 assertThat(getRequestParameter("http://example.com/?space=%20&tab=%09"), 85 is(expected)); 84 assertEquals(expected, getRequestParameter("http://example.com/?space=%20&tab=%09")); 86 85 } 87 86 }
Note: See TracChangeset
for help on using the changeset viewer.