Examples of UriComponents


Examples of org.springframework.web.util.UriComponents

    assertThat(queryParams.get("offset"), contains("10"));
  }

  @Test
  public void testFromMethodCallWithPathVarAndMultiValueRequestParams() {
    UriComponents uriComponents = fromMethodCall(on(
        ControllerWithMethods.class).methodWithMultiValueRequestParams("1", Arrays.asList(3, 7), 5)).build();

    assertThat(uriComponents.getPath(), is("/something/1/foo"));

    MultiValueMap<String, String> queryParams = uriComponents.getQueryParams();
    assertThat(queryParams.get("limit"), contains("5"));
    assertThat(queryParams.get("items"), containsInAnyOrder("3", "7"));
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.