use of com.gargoylesoftware.htmlunit.util.NameValuePair in project spring-framework by spring-projects.
the class HtmlUnitRequestBuilderTests method buildRequestParameterMapViaWebRequestDotSetRequestParametersWithSingleRequestParamWithNullValue.
@Test
public void buildRequestParameterMapViaWebRequestDotSetRequestParametersWithSingleRequestParamWithNullValue() {
webRequest.setRequestParameters(asList(new NameValuePair("name", null)));
MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext);
assertThat(actualRequest.getParameterMap().size(), equalTo(1));
assertThat(actualRequest.getParameter("name"), nullValue());
}
use of com.gargoylesoftware.htmlunit.util.NameValuePair in project spring-framework by spring-projects.
the class HtmlUnitRequestBuilderTests method buildRequestParameterMapViaWebRequestDotSetRequestParametersWithSingleRequestParamWithEmptyValue.
@Test
public void buildRequestParameterMapViaWebRequestDotSetRequestParametersWithSingleRequestParamWithEmptyValue() {
webRequest.setRequestParameters(asList(new NameValuePair("name", "")));
MockHttpServletRequest actualRequest = requestBuilder.buildRequest(servletContext);
assertThat(actualRequest.getParameterMap().size(), equalTo(1));
assertThat(actualRequest.getParameter("name"), equalTo(""));
}
Aggregations