Assert status quo & add TODO

Issue: SPR-13537
This commit is contained in:
Sam Brannen
2015-10-04 18:16:50 +02:00
parent 1c6febc45c
commit c52f9d3524

View File

@@ -42,6 +42,7 @@ import static org.junit.Assert.*;
* @author Phillip Webb
* @author Oliver Gierke
* @author David Eckel
* @author Sam Brannen
*/
public class UriComponentsBuilderTests {
@@ -609,18 +610,23 @@ public class UriComponentsBuilderTests {
public void queryParamWithValueWithEquals() throws Exception {
UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar=baz").build();
assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar=baz"));
assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo("baz"));
}
@Test
public void queryParamWithoutValueWithEquals() throws Exception {
UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar=").build();
assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar="));
assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo(""));
}
@Test
public void queryParamWithoutValueWithoutEquals() throws Exception {
UriComponents uriComponents = UriComponentsBuilder.fromUriString("http://example.com/foo?bar").build();
assertThat(uriComponents.toUriString(), equalTo("http://example.com/foo?bar"));
// TODO [SPR-13537] Change equalTo(null) to equalTo("").
assertThat(uriComponents.getQueryParams().get("bar").get(0), equalTo(null));
}
@Test