SPR-5973: Changed UriComponent from inner type to top-level enum

This commit is contained in:
Arjen Poutsma
2011-09-07 10:40:40 +00:00
parent 6b7e7d9b5c
commit 1d75e1b250
5 changed files with 212 additions and 156 deletions

View File

@@ -38,6 +38,14 @@ public class UriBuilderTests {
assertEquals("Invalid result URI", expected, result);
}
@Test
public void fromPath() throws URISyntaxException {
URI result = UriBuilder.fromPath("foo").queryParam("bar").fragment("baz").build();
URI expected = new URI("/foo?bar#baz");
assertEquals("Invalid result URI", expected, result);
}
@Test
public void fromUri() throws URISyntaxException {
URI uri = new URI("http://example.com/foo?bar#baz");