提交 0a10f95e 编写于 作者: R Rossen Stoyanchev

Shorten package name for Spring MVC Test framework

上级 caf2af07
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.support; package org.springframework.test.util;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import java.text.ParseException; import java.text.ParseException;
import java.util.List; import java.util.List;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.support; package org.springframework.test.util;
import java.io.StringReader; import java.io.StringReader;
import java.util.Map; import java.util.Map;
...@@ -28,8 +28,8 @@ import org.custommonkey.xmlunit.Diff; ...@@ -28,8 +28,8 @@ import org.custommonkey.xmlunit.Diff;
import org.custommonkey.xmlunit.XMLUnit; import org.custommonkey.xmlunit.XMLUnit;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.springframework.test.web.mock.AssertionErrors; import org.springframework.test.util.AssertionErrors;
import org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers; import org.springframework.test.web.servlet.result.MockMvcResultMatchers;
import org.w3c.dom.Document; import org.w3c.dom.Document;
import org.w3c.dom.Node; import org.w3c.dom.Node;
import org.xml.sax.InputSource; import org.xml.sax.InputSource;
......
...@@ -14,9 +14,9 @@ ...@@ -14,9 +14,9 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.support; package org.springframework.test.util;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import java.io.StringReader; import java.io.StringReader;
import java.util.Collections; import java.util.Collections;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
...@@ -24,8 +24,8 @@ import java.util.List; ...@@ -24,8 +24,8 @@ import java.util.List;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.test.web.mock.client.match.MockRestRequestMatchers; import org.springframework.test.web.client.match.MockRestRequestMatchers;
import org.springframework.test.web.mock.client.response.MockRestResponseCreators; import org.springframework.test.web.client.response.MockRestResponseCreators;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
import org.springframework.web.client.support.RestGatewaySupport; import org.springframework.web.client.support.RestGatewaySupport;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
import java.io.IOException; import java.io.IOException;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
import java.io.IOException; import java.io.IOException;
import java.util.LinkedList; import java.util.LinkedList;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
/** /**
* A contract for setting up request expectations and defining a response. * A contract for setting up request expectations and defining a response.
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
import java.io.IOException; import java.io.IOException;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;
import org.springframework.test.web.mock.client.response.MockRestResponseCreators; import org.springframework.test.web.client.response.MockRestResponseCreators;
/** /**
* A contract for creating a {@link ClientHttpResponse}. * A contract for creating a {@link ClientHttpResponse}.
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import java.io.IOException; import java.io.IOException;
...@@ -29,8 +29,8 @@ import org.hamcrest.Matchers; ...@@ -29,8 +29,8 @@ import org.hamcrest.Matchers;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.RequestMatcher; import org.springframework.test.util.XmlExpectationsHelper;
import org.springframework.test.web.mock.support.XmlExpectationsHelper; import org.springframework.test.web.client.RequestMatcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
/** /**
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.instanceOf;
...@@ -25,8 +25,8 @@ import java.util.List; ...@@ -25,8 +25,8 @@ import java.util.List;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.RequestMatcher; import org.springframework.test.util.JsonPathExpectationsHelper;
import org.springframework.test.web.mock.support.JsonPathExpectationsHelper; import org.springframework.test.web.client.RequestMatcher;
/** /**
* Factory methods for request content {@code RequestMatcher}'s using a <a * Factory methods for request content {@code RequestMatcher}'s using a <a
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
...@@ -30,9 +30,9 @@ import org.springframework.http.HttpHeaders; ...@@ -30,9 +30,9 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.AssertionErrors; import org.springframework.test.util.AssertionErrors;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.test.web.mock.client.RequestMatcher; import org.springframework.test.web.client.RequestMatcher;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import java.io.IOException; import java.io.IOException;
import java.util.Map; import java.util.Map;
...@@ -24,8 +24,8 @@ import org.hamcrest.Matcher; ...@@ -24,8 +24,8 @@ import org.hamcrest.Matcher;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.RequestMatcher; import org.springframework.test.util.XpathExpectationsHelper;
import org.springframework.test.web.mock.support.XpathExpectationsHelper; import org.springframework.test.web.client.RequestMatcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
/** /**
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
*/ */
/** /**
* Contains built-in {@link org.springframework.test.web.mock.client.RequestMatcher} * Contains built-in {@link org.springframework.test.web.client.RequestMatcher}
* implementations. Use * implementations. Use
* {@link org.springframework.test.web.mock.client.match.MockRestRequestMatchers} * {@link org.springframework.test.web.client.match.MockRestRequestMatchers}
* to gain access to instances of those implementations. * to gain access to instances of those implementations.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
/** /**
* Contains client-side REST testing support. * Contains client-side REST testing support.
* @see org.springframework.test.web.mock.client.MockRestServiceServer * @see org.springframework.test.web.client.MockRestServiceServer
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.response; package org.springframework.test.web.client.response;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
...@@ -27,7 +27,7 @@ import org.springframework.http.MediaType; ...@@ -27,7 +27,7 @@ import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpResponse; import org.springframework.http.client.ClientHttpResponse;
import org.springframework.mock.http.client.MockClientHttpResponse; import org.springframework.mock.http.client.MockClientHttpResponse;
import org.springframework.test.web.mock.client.ResponseCreator; import org.springframework.test.web.client.ResponseCreator;
import org.springframework.util.Assert; import org.springframework.util.Assert;
/** /**
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.response; package org.springframework.test.web.client.response;
import java.io.IOException; import java.io.IOException;
import java.net.URI; import java.net.URI;
...@@ -24,7 +24,7 @@ import org.springframework.http.HttpStatus; ...@@ -24,7 +24,7 @@ import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockClientHttpResponse; import org.springframework.mock.http.client.MockClientHttpResponse;
import org.springframework.test.web.mock.client.ResponseCreator; import org.springframework.test.web.client.ResponseCreator;
/** /**
* Static factory methods for obtaining a {@link ResponseCreator} instance. * Static factory methods for obtaining a {@link ResponseCreator} instance.
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
*/ */
/** /**
* Contains built-in {@link org.springframework.test.web.mock.servlet.RequestBuilder} * Contains built-in {@link org.springframework.test.web.client.ResponseCreator}
* implementations. Use * implementations. Use
* {@link org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders} * {@link org.springframework.test.web.client.response.MockRestResponseCreators}
* to gain access to instances of those implementations. * to gain access to instances of those implementations.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.client.response;
/*
* Copyright 2002-2012 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Support classes shared among client and server-side Spring MVC Test classes.
*/
package org.springframework.test.web.mock.support;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -67,7 +67,7 @@ public final class MockMvc { ...@@ -67,7 +67,7 @@ public final class MockMvc {
/** /**
* Private constructor, not for direct instantiation. * Private constructor, not for direct instantiation.
* @see org.springframework.test.web.mock.servlet.setup.MockMvcBuilders * @see org.springframework.test.web.servlet.setup.MockMvcBuilders
*/ */
MockMvc(MockFilterChain filterChain, ServletContext servletContext) { MockMvc(MockFilterChain filterChain, ServletContext servletContext) {
Assert.notNull(servletContext, "A ServletContext is required"); Assert.notNull(servletContext, "A ServletContext is required");
...@@ -79,7 +79,7 @@ public final class MockMvc { ...@@ -79,7 +79,7 @@ public final class MockMvc {
/** /**
* A default request builder merged into every performed request. * A default request builder merged into every performed request.
* @see org.springframework.test.web.mock.servlet.setup.DefaultMockMvcBuilder#defaultRequest(RequestBuilder) * @see org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder#defaultRequest(RequestBuilder)
*/ */
void setDefaultRequest(RequestBuilder requestBuilder) { void setDefaultRequest(RequestBuilder requestBuilder) {
this.defaultRequestBuilder = requestBuilder; this.defaultRequestBuilder = requestBuilder;
...@@ -87,7 +87,7 @@ public final class MockMvc { ...@@ -87,7 +87,7 @@ public final class MockMvc {
/** /**
* Expectations to assert after every performed request. * Expectations to assert after every performed request.
* @see org.springframework.test.web.mock.servlet.setup.DefaultMockMvcBuilder#alwaysExpect(ResultMatcher) * @see org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder#alwaysExpect(ResultMatcher)
*/ */
void setGlobalResultMatchers(List<ResultMatcher> resultMatchers) { void setGlobalResultMatchers(List<ResultMatcher> resultMatchers) {
Assert.notNull(resultMatchers, "resultMatchers is required"); Assert.notNull(resultMatchers, "resultMatchers is required");
...@@ -96,7 +96,7 @@ public final class MockMvc { ...@@ -96,7 +96,7 @@ public final class MockMvc {
/** /**
* General actions to apply after every performed request. * General actions to apply after every performed request.
* @see org.springframework.test.web.mock.servlet.setup.DefaultMockMvcBuilder#alwaysDo(ResultHandler) * @see org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder#alwaysDo(ResultHandler)
*/ */
void setGlobalResultHandlers(List<ResultHandler> resultHandlers) { void setGlobalResultHandlers(List<ResultHandler> resultHandlers) {
Assert.notNull(resultHandlers, "resultHandlers is required"); Assert.notNull(resultHandlers, "resultHandlers is required");
...@@ -109,12 +109,12 @@ public final class MockMvc { ...@@ -109,12 +109,12 @@ public final class MockMvc {
* *
* @param requestBuilder used to prepare the request to execute; * @param requestBuilder used to prepare the request to execute;
* see static factory methods in * see static factory methods in
* {@link org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders} * {@link org.springframework.test.web.servlet.request.MockMvcRequestBuilders}
* *
* @return an instance of {@link ResultActions}; never {@code null} * @return an instance of {@link ResultActions}; never {@code null}
* *
* @see org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders * @see org.springframework.test.web.servlet.request.MockMvcRequestBuilders
* @see org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers * @see org.springframework.test.web.servlet.result.MockMvcResultMatchers
*/ */
public ResultActions perform(RequestBuilder requestBuilder) throws Exception { public ResultActions perform(RequestBuilder requestBuilder) throws Exception {
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
/** /**
* Builds a {@link MockMvc}. * Builds a {@link MockMvc}.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import java.util.List; import java.util.List;
...@@ -31,7 +31,7 @@ import org.springframework.web.context.WebApplicationContext; ...@@ -31,7 +31,7 @@ import org.springframework.web.context.WebApplicationContext;
* Base class for MockMvc builder implementations, providing the capability to * Base class for MockMvc builder implementations, providing the capability to
* create a {@link MockMvc} instance. * create a {@link MockMvc} instance.
* *
* <p>{@link org.springframework.test.web.mock.servlet.setup.DefaultMockMvcBuilder}, * <p>{@link org.springframework.test.web.servlet.setup.DefaultMockMvcBuilder},
* which derives from this class, provides a concrete {@code build} method, * which derives from this class, provides a concrete {@code build} method,
* and delegates to abstract methods to obtain a {@link WebApplicationContext}. * and delegates to abstract methods to obtain a {@link WebApplicationContext}.
* *
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
......
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
/** /**
* Allows applying actions, such as expectations, on the result of an executed * Allows applying actions, such as expectations, on the result of an executed
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
/** /**
* Executes a generic action (e.g. printing debug information) on the result of * Executes a generic action (e.g. printing debug information) on the result of
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
/** /**
* Matches the result of an executed request against some expectation. * Matches the result of an executed request against some expectation.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import java.io.IOException; import java.io.IOException;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
......
...@@ -16,6 +16,6 @@ ...@@ -16,6 +16,6 @@
/** /**
* Contains server-side support for testing Spring MVC applications. * Contains server-side support for testing Spring MVC applications.
* @see org.springframework.test.web.mock.servlet.MockMvc * @see org.springframework.test.web.servlet.MockMvc
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import java.io.UnsupportedEncodingException; import java.io.UnsupportedEncodingException;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
...@@ -40,9 +40,9 @@ import org.springframework.http.MediaType; ...@@ -40,9 +40,9 @@ import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.mock.web.MockHttpSession; import org.springframework.mock.web.MockHttpSession;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.RequestBuilder; import org.springframework.test.web.servlet.RequestBuilder;
import org.springframework.test.web.mock.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
...@@ -653,7 +653,7 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable ...@@ -653,7 +653,7 @@ public class MockHttpServletRequestBuilder implements RequestBuilder, Mergeable
private MockHttpServletRequest createServlet3Request(ServletContext servletContext) { private MockHttpServletRequest createServlet3Request(ServletContext servletContext) {
try { try {
String className = "org.springframework.test.web.mock.servlet.request.Servlet3MockHttpServletRequest"; String className = "org.springframework.test.web.servlet.request.Servlet3MockHttpServletRequest";
Class<?> clazz = ClassUtils.forName(className, MockHttpServletRequestBuilder.class.getClassLoader()); Class<?> clazz = ClassUtils.forName(className, MockHttpServletRequestBuilder.class.getClassLoader());
Constructor<?> constructor = clazz.getConstructor(ServletContext.class); Constructor<?> constructor = clazz.getConstructor(ServletContext.class);
return (MockHttpServletRequest) BeanUtils.instantiateClass(constructor, servletContext); return (MockHttpServletRequest) BeanUtils.instantiateClass(constructor, servletContext);
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import java.lang.reflect.Constructor; import java.lang.reflect.Constructor;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -110,7 +110,7 @@ public class MockMultipartHttpServletRequestBuilder extends MockHttpServletReque ...@@ -110,7 +110,7 @@ public class MockMultipartHttpServletRequestBuilder extends MockHttpServletReque
private MockMultipartHttpServletRequest createServlet3Request() { private MockMultipartHttpServletRequest createServlet3Request() {
try { try {
String className = "org.springframework.test.web.mock.servlet.request.Servlet3MockMultipartHttpServletRequest"; String className = "org.springframework.test.web.servlet.request.Servlet3MockMultipartHttpServletRequest";
Class<?> clazz = ClassUtils.forName(className, MockMultipartHttpServletRequestBuilder.class.getClassLoader()); Class<?> clazz = ClassUtils.forName(className, MockMultipartHttpServletRequestBuilder.class.getClassLoader());
Constructor<?> constructor = clazz.getDeclaredConstructor(); Constructor<?> constructor = clazz.getDeclaredConstructor();
return (MockMultipartHttpServletRequest) BeanUtils.instantiateClass(constructor); return (MockMultipartHttpServletRequest) BeanUtils.instantiateClass(constructor);
......
...@@ -13,10 +13,10 @@ ...@@ -13,10 +13,10 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.test.web.mock.servlet.RequestBuilder; import org.springframework.test.web.servlet.RequestBuilder;
/** /**
* Static factory methods for {@link RequestBuilder}s. * Static factory methods for {@link RequestBuilder}s.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import java.io.IOException; import java.io.IOException;
import java.util.Collection; import java.util.Collection;
......
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
*/ */
/** /**
* Contains built-in {@link org.springframework.test.web.mock.client.ResponseCreator} * Contains built-in {@link org.springframework.test.web.servlet.RequestBuilder}
* implementations. Use * implementations. Use
* {@link org.springframework.test.web.mock.client.response.MockRestResponseCreators} * {@link org.springframework.test.web.servlet.request.MockMvcRequestBuilders}
* to gain access to instances of those implementations. * to gain access to instances of those implementations.
*/ */
package org.springframework.test.web.mock.client.response; package org.springframework.test.web.servlet.request;
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import java.util.Map; import java.util.Map;
...@@ -29,9 +29,9 @@ import org.hamcrest.Matcher; ...@@ -29,9 +29,9 @@ import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.util.XmlExpectationsHelper;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.support.XmlExpectationsHelper; import org.springframework.test.web.servlet.ResultMatcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
/** /**
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import javax.servlet.http.Cookie; import javax.servlet.http.Cookie;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Factory for response cookie assertions. An instance of this class is * Factory for response cookie assertions. An instance of this class is
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.*; import static org.springframework.test.util.AssertionErrors.*;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Factory for "output" flash attribute assertions. An instance of this class is * Factory for "output" flash attribute assertions. An instance of this class is
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter; import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Factory for response header assertions. An instance of this * Factory for response header assertions. An instance of this
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.instanceOf; import static org.hamcrest.Matchers.instanceOf;
...@@ -22,9 +22,9 @@ import static org.hamcrest.Matchers.instanceOf; ...@@ -22,9 +22,9 @@ import static org.hamcrest.Matchers.instanceOf;
import java.util.List; import java.util.List;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.util.JsonPathExpectationsHelper;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.support.JsonPathExpectationsHelper; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Factory for assertions on the response content using <a * Factory for assertions on the response content using <a
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultHandler; import org.springframework.test.web.servlet.ResultHandler;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
/** /**
......
...@@ -14,17 +14,17 @@ ...@@ -14,17 +14,17 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import java.util.Map; import java.util.Map;
import javax.xml.xpath.XPathExpressionException; import javax.xml.xpath.XPathExpressionException;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Static, factory methods for {@link ResultMatcher}-based result actions. * Static, factory methods for {@link ResultMatcher}-based result actions.
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.ui.ModelMap; import org.springframework.ui.ModelMap;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import java.util.Enumeration; import java.util.Enumeration;
import org.springframework.http.HttpHeaders; import org.springframework.http.HttpHeaders;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultHandler; import org.springframework.test.web.servlet.ResultHandler;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.method.HandlerMethod; import org.springframework.web.method.HandlerMethod;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
...@@ -26,8 +26,8 @@ import org.hamcrest.Matcher; ...@@ -26,8 +26,8 @@ import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.web.context.request.async.AsyncTask; import org.springframework.web.context.request.async.AsyncTask;
import org.springframework.web.context.request.async.DeferredResult; import org.springframework.web.context.request.async.DeferredResult;
import org.springframework.web.context.request.async.WebAsyncManager; import org.springframework.web.context.request.async.WebAsyncManager;
......
...@@ -13,16 +13,16 @@ ...@@ -13,16 +13,16 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertEquals; import static org.springframework.test.util.AssertionErrors.assertEquals;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
/** /**
* Factory for assertions on the response status. An instance of this class is * Factory for assertions on the response status. An instance of this class is
......
...@@ -14,15 +14,15 @@ ...@@ -14,15 +14,15 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.springframework.test.web.mock.AssertionErrors.assertTrue; import static org.springframework.test.util.AssertionErrors.assertTrue;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.MatcherAssert; import org.hamcrest.MatcherAssert;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
/** /**
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import java.util.Map; import java.util.Map;
...@@ -22,9 +22,9 @@ import javax.xml.xpath.XPathExpressionException; ...@@ -22,9 +22,9 @@ import javax.xml.xpath.XPathExpressionException;
import org.hamcrest.Matcher; import org.hamcrest.Matcher;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.util.XpathExpectationsHelper;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.support.XpathExpectationsHelper; import org.springframework.test.web.servlet.ResultMatcher;
import org.w3c.dom.Node; import org.w3c.dom.Node;
/** /**
......
...@@ -16,8 +16,8 @@ ...@@ -16,8 +16,8 @@
/** /**
* Contains built-in {@code ResultMatcher} and {@code ResultHandler} implementations. * Contains built-in {@code ResultMatcher} and {@code ResultHandler} implementations.
* Use {@link org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers} * Use {@link org.springframework.test.web.servlet.result.MockMvcResultMatchers}
* and {@link org.springframework.test.web.mock.servlet.result.MockMvcResultHandlers} * and {@link org.springframework.test.web.servlet.result.MockMvcResultHandlers}
* to access to instances of those implementations. * to access to instances of those implementations.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -23,12 +23,12 @@ import javax.servlet.Filter; ...@@ -23,12 +23,12 @@ import javax.servlet.Filter;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import org.springframework.mock.web.MockServletConfig; import org.springframework.mock.web.MockServletConfig;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.MockMvcBuilder; import org.springframework.test.web.servlet.MockMvcBuilder;
import org.springframework.test.web.mock.servlet.MockMvcBuilderSupport; import org.springframework.test.web.servlet.MockMvcBuilderSupport;
import org.springframework.test.web.mock.servlet.RequestBuilder; import org.springframework.test.web.servlet.RequestBuilder;
import org.springframework.test.web.mock.servlet.ResultHandler; import org.springframework.test.web.servlet.ResultHandler;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
...@@ -142,7 +142,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB ...@@ -142,7 +142,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
* default properties defined here. * default properties defined here.
* *
* @param requestBuilder a RequestBuilder; see static factory methods in * @param requestBuilder a RequestBuilder; see static factory methods in
* {@link org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders} * {@link org.springframework.test.web.servlet.request.MockMvcRequestBuilders}
* . * .
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
...@@ -157,7 +157,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB ...@@ -157,7 +157,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
* {@code "application/json"}, etc. * {@code "application/json"}, etc.
* *
* @param resultMatcher a ResultMatcher; see static factory methods in * @param resultMatcher a ResultMatcher; see static factory methods in
* {@link org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers} * {@link org.springframework.test.web.servlet.result.MockMvcResultMatchers}
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public final <T extends Self> T alwaysExpect(ResultMatcher resultMatcher) { public final <T extends Self> T alwaysExpect(ResultMatcher resultMatcher) {
...@@ -171,7 +171,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB ...@@ -171,7 +171,7 @@ public class DefaultMockMvcBuilder<Self extends MockMvcBuilder> extends MockMvcB
* request and resulting response to {@code System.out}. * request and resulting response to {@code System.out}.
* *
* @param resultHandler a ResultHandler; see static factory methods in * @param resultHandler a ResultHandler; see static factory methods in
* {@link org.springframework.test.web.mock.servlet.result.MockMvcResultHandlers} * {@link org.springframework.test.web.servlet.result.MockMvcResultHandlers}
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public final <T extends Self> T alwaysDo(ResultHandler resultHandler) { public final <T extends Self> T alwaysDo(ResultHandler resultHandler) {
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.MockMvcBuilder; import org.springframework.test.web.servlet.MockMvcBuilder;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.DispatcherServlet; import org.springframework.web.servlet.DispatcherServlet;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License. * specific language governing permissions and limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
import java.io.IOException; import java.io.IOException;
import java.util.ArrayList; import java.util.ArrayList;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
import java.io.IOException; import java.io.IOException;
import java.lang.annotation.Annotation; import java.lang.annotation.Annotation;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/** /**
* Contains built-in {@code MockMvcBuilder} implementations. * Contains built-in {@code MockMvcBuilder} implementations.
* Use {@link org.springframework.test.web.mock.servlet.setup.MockMvcBuilders} * Use {@link org.springframework.test.web.servlet.setup.MockMvcBuilders}
* to access to instances of those implementations. * to access to instances of those implementations.
*/ */
package org.springframework.test.web.mock.servlet.setup; package org.springframework.test.web.servlet.setup;
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock; package org.springframework.test.web;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlRootElement;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client; package org.springframework.test.web.client;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertSame; import static org.junit.Assert.assertSame;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.anything; import static org.springframework.test.web.client.match.MockRestRequestMatchers.anything;
import java.net.URI; import java.net.URI;
...@@ -27,7 +27,7 @@ import org.junit.Test; ...@@ -27,7 +27,7 @@ import org.junit.Test;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest; import org.springframework.http.client.ClientHttpRequest;
import org.springframework.http.client.ClientHttpRequestFactory; import org.springframework.http.client.ClientHttpRequestFactory;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import static org.hamcrest.Matchers.hasXPath; import static org.hamcrest.Matchers.hasXPath;
...@@ -21,8 +21,8 @@ import org.junit.Before; ...@@ -21,8 +21,8 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.match.ContentRequestMatchers; import org.springframework.test.web.client.match.ContentRequestMatchers;
import org.springframework.test.web.mock.client.match.MockRestRequestMatchers; import org.springframework.test.web.client.match.MockRestRequestMatchers;
/** /**
* Tests for {@link ContentRequestMatchers}. * Tests for {@link ContentRequestMatchers}.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import java.io.IOException; import java.io.IOException;
...@@ -21,7 +21,7 @@ import org.hamcrest.Matchers; ...@@ -21,7 +21,7 @@ import org.hamcrest.Matchers;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.match.JsonPathRequestMatchers; import org.springframework.test.web.client.match.JsonPathRequestMatchers;
/** /**
* Tests for {@link JsonPathRequestMatchers}. * Tests for {@link JsonPathRequestMatchers}.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
...@@ -24,7 +24,7 @@ import org.junit.Before; ...@@ -24,7 +24,7 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.match.MockRestRequestMatchers; import org.springframework.test.web.client.match.MockRestRequestMatchers;
/** /**
* Tests for {@link MockRestRequestMatchers}. * Tests for {@link MockRestRequestMatchers}.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.match; package org.springframework.test.web.client.match;
import java.io.IOException; import java.io.IOException;
...@@ -21,7 +21,7 @@ import org.hamcrest.Matchers; ...@@ -21,7 +21,7 @@ import org.hamcrest.Matchers;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.http.client.MockClientHttpRequest; import org.springframework.mock.http.client.MockClientHttpRequest;
import org.springframework.test.web.mock.client.match.XpathRequestMatchers; import org.springframework.test.web.client.match.XpathRequestMatchers;
/** /**
* Tests for {@link XpathRequestMatchers}. * Tests for {@link XpathRequestMatchers}.
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.response; package org.springframework.test.web.client.response;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
...@@ -26,8 +26,8 @@ import org.junit.Test; ...@@ -26,8 +26,8 @@ import org.junit.Test;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.mock.http.client.MockClientHttpResponse; import org.springframework.mock.http.client.MockClientHttpResponse;
import org.springframework.test.web.mock.client.response.DefaultResponseCreator; import org.springframework.test.web.client.response.DefaultResponseCreator;
import org.springframework.test.web.mock.client.response.MockRestResponseCreators; import org.springframework.test.web.client.response.MockRestResponseCreators;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
/** /**
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples; package org.springframework.test.web.client.samples;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.method; import static org.springframework.test.web.client.match.MockRestRequestMatchers.method;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -26,8 +26,8 @@ import org.springframework.core.io.ClassPathResource; ...@@ -26,8 +26,8 @@ import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.http.HttpMethod; import org.springframework.http.HttpMethod;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples.matchers; package org.springframework.test.web.client.samples.matchers;
import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content; import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -29,8 +29,8 @@ import org.junit.Test; ...@@ -29,8 +29,8 @@ import org.junit.Test;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples.matchers; package org.springframework.test.web.client.samples.matchers;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.header; import static org.springframework.test.web.client.match.MockRestRequestMatchers.header;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -30,8 +30,8 @@ import org.springframework.http.MediaType; ...@@ -30,8 +30,8 @@ import org.springframework.http.MediaType;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.StringHttpMessageConverter; import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
......
...@@ -13,17 +13,17 @@ ...@@ -13,17 +13,17 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples.matchers; package org.springframework.test.web.client.samples.matchers;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.endsWith; import static org.hamcrest.Matchers.endsWith;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.isIn; import static org.hamcrest.Matchers.isIn;
import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.Matchers.startsWith;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content; import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.jsonPath; import static org.springframework.test.web.client.match.MockRestRequestMatchers.jsonPath;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -34,8 +34,8 @@ import org.junit.Before; ...@@ -34,8 +34,8 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter; import org.springframework.http.converter.json.MappingJacksonHttpMessageConverter;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.util.LinkedMultiValueMap; import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap; import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples.matchers; package org.springframework.test.web.client.samples.matchers;
import static org.hamcrest.Matchers.hasXPath; import static org.hamcrest.Matchers.hasXPath;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content; import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -35,8 +35,8 @@ import org.junit.Before; ...@@ -35,8 +35,8 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter; import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.client.samples.matchers; package org.springframework.test.web.client.samples.matchers;
import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.closeTo;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
...@@ -21,10 +21,10 @@ import static org.hamcrest.Matchers.greaterThan; ...@@ -21,10 +21,10 @@ import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThan; import static org.hamcrest.Matchers.lessThan;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.Matchers.startsWith;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.content; import static org.springframework.test.web.client.match.MockRestRequestMatchers.content;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.mock.client.match.MockRestRequestMatchers.xpath; import static org.springframework.test.web.client.match.MockRestRequestMatchers.xpath;
import static org.springframework.test.web.mock.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import java.net.URI; import java.net.URI;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -43,8 +43,8 @@ import org.junit.Before; ...@@ -43,8 +43,8 @@ import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.converter.HttpMessageConverter; import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter; import org.springframework.http.converter.xml.Jaxb2RootElementHttpMessageConverter;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.client.MockRestServiceServer; import org.springframework.test.web.client.MockRestServiceServer;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
/** /**
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet; package org.springframework.test.web.servlet;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.web.servlet.FlashMap; import org.springframework.web.servlet.FlashMap;
import org.springframework.web.servlet.HandlerInterceptor; import org.springframework.web.servlet.HandlerInterceptor;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.request; package org.springframework.test.web.servlet.request;
import static org.junit.Assert.assertArrayEquals; import static org.junit.Assert.assertArrayEquals;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
...@@ -39,6 +39,7 @@ import org.springframework.http.MediaType; ...@@ -39,6 +39,7 @@ import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpSession; import org.springframework.mock.web.MockHttpSession;
import org.springframework.mock.web.MockServletContext; import org.springframework.mock.web.MockServletContext;
import org.springframework.test.web.servlet.request.MockHttpServletRequestBuilder;
import org.springframework.util.FileCopyUtils; import org.springframework.util.FileCopyUtils;
import org.springframework.web.servlet.FlashMap; import org.springframework.web.servlet.FlashMap;
import org.springframework.web.servlet.support.SessionFlashMapManager; import org.springframework.web.servlet.support.SessionFlashMapManager;
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.ContentResultMatchers; import org.springframework.test.web.servlet.result.ContentResultMatchers;
/** /**
* @author Rossen Stoyanchev * @author Rossen Stoyanchev
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import org.junit.Test; import org.junit.Test;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.FlashAttributeResultMatchers; import org.springframework.test.web.servlet.result.FlashAttributeResultMatchers;
import org.springframework.web.servlet.FlashMap; import org.springframework.web.servlet.FlashMap;
/** /**
......
...@@ -14,13 +14,13 @@ ...@@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.JsonPathResultMatchers; import org.springframework.test.web.servlet.result.JsonPathResultMatchers;
/** /**
* Tests for {@link JsonPathResultMatchers}. * Tests for {@link JsonPathResultMatchers}.
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
...@@ -22,9 +22,9 @@ import java.util.Date; ...@@ -22,9 +22,9 @@ import java.util.Date;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.ModelResultMatchers; import org.springframework.test.web.servlet.result.ModelResultMatchers;
import org.springframework.validation.BeanPropertyBindingResult; import org.springframework.validation.BeanPropertyBindingResult;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.ModelAndView;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertTrue;
...@@ -31,8 +31,8 @@ import org.springframework.http.HttpHeaders; ...@@ -31,8 +31,8 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.PrintingResultHandler; import org.springframework.test.web.servlet.result.PrintingResultHandler;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.validation.BindException; import org.springframework.validation.BindException;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import static org.junit.Assert.fail; import static org.junit.Assert.fail;
...@@ -27,10 +27,10 @@ import org.springframework.core.Conventions; ...@@ -27,10 +27,10 @@ import org.springframework.core.Conventions;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.StatusResultMatchers; import org.springframework.test.web.servlet.result.StatusResultMatchers;
import org.springframework.util.ReflectionUtils; import org.springframework.util.ReflectionUtils;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
......
...@@ -13,13 +13,13 @@ ...@@ -13,13 +13,13 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.result; package org.springframework.test.web.servlet.result;
import org.hamcrest.Matchers; import org.hamcrest.Matchers;
import org.junit.Test; import org.junit.Test;
import org.springframework.mock.web.MockHttpServletResponse; import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.web.mock.servlet.StubMvcResult; import org.springframework.test.web.servlet.StubMvcResult;
import org.springframework.test.web.mock.servlet.result.XpathResultMatchers; import org.springframework.test.web.servlet.result.XpathResultMatchers;
/** /**
* Tests for {@link XpathResultMatchers}. * Tests for {@link XpathResultMatchers}.
......
...@@ -14,11 +14,11 @@ ...@@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.context; package org.springframework.test.web.servlet.samples.context;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -29,9 +29,9 @@ import org.springframework.context.annotation.Configuration; ...@@ -29,9 +29,9 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.samples.context.JavaConfigTests.WebConfig; import org.springframework.test.web.servlet.samples.context.JavaConfigTests.WebConfig;
import org.springframework.test.web.mock.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer; import org.springframework.web.servlet.config.annotation.DefaultServletHandlerConfigurer;
import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.EnableWebMvc;
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License. * specific language governing permissions and limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.context; package org.springframework.test.web.servlet.samples.context;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
...@@ -34,7 +34,7 @@ import org.springframework.security.core.userdetails.UserDetailsService; ...@@ -34,7 +34,7 @@ import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.web.context.HttpRequestResponseHolder; import org.springframework.security.web.context.HttpRequestResponseHolder;
import org.springframework.security.web.context.HttpSessionSecurityContextRepository; import org.springframework.security.web.context.HttpSessionSecurityContextRepository;
import org.springframework.security.web.context.SecurityContextRepository; import org.springframework.security.web.context.SecurityContextRepository;
import org.springframework.test.web.mock.servlet.request.RequestPostProcessor; import org.springframework.test.web.servlet.request.RequestPostProcessor;
import org.springframework.util.Assert; import org.springframework.util.Assert;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.WebApplicationContextUtils; import org.springframework.web.context.support.WebApplicationContextUtils;
......
...@@ -11,15 +11,15 @@ ...@@ -11,15 +11,15 @@
* specific language governing permissions and limitations under the License. * specific language governing permissions and limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.context; package org.springframework.test.web.servlet.samples.context;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.redirectedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.samples.context.SecurityRequestPostProcessors.user; import static org.springframework.test.web.servlet.samples.context.SecurityRequestPostProcessors.user;
import static org.springframework.test.web.mock.servlet.samples.context.SecurityRequestPostProcessors.userDeatilsService; import static org.springframework.test.web.servlet.samples.context.SecurityRequestPostProcessors.userDeatilsService;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
...@@ -36,11 +36,11 @@ import org.springframework.security.web.context.HttpSessionSecurityContextReposi ...@@ -36,11 +36,11 @@ import org.springframework.security.web.context.HttpSessionSecurityContextReposi
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.MvcResult; import org.springframework.test.web.servlet.MvcResult;
import org.springframework.test.web.mock.servlet.ResultMatcher; import org.springframework.test.web.servlet.ResultMatcher;
import org.springframework.test.web.mock.servlet.request.RequestPostProcessor; import org.springframework.test.web.servlet.request.RequestPostProcessor;
import org.springframework.test.web.mock.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
/** /**
......
...@@ -14,14 +14,14 @@ ...@@ -14,14 +14,14 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.context; package org.springframework.test.web.servlet.samples.context;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.handler; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.handler;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -30,8 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -30,8 +30,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler; import org.springframework.web.servlet.resource.DefaultServletHttpRequestHandler;
......
...@@ -14,10 +14,10 @@ ...@@ -14,10 +14,10 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.context; package org.springframework.test.web.servlet.samples.context;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -26,8 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -26,8 +26,8 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import org.springframework.test.context.web.WebAppConfiguration; import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.setup.MockMvcBuilders; import org.springframework.test.web.servlet.setup.MockMvcBuilders;
import org.springframework.web.context.WebApplicationContext; import org.springframework.web.context.WebApplicationContext;
/** /**
......
...@@ -13,20 +13,20 @@ ...@@ -13,20 +13,20 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.request; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.request;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.util.concurrent.Callable; import java.util.concurrent.Callable;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.context.request.async.DeferredResult; import org.springframework.web.context.request.async.DeferredResult;
......
...@@ -14,12 +14,12 @@ ...@@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
......
...@@ -13,11 +13,11 @@ ...@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.fileUpload; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.fileUpload;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.model; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.io.IOException; import java.io.IOException;
......
...@@ -10,14 +10,14 @@ ...@@ -10,14 +10,14 @@
* an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
* specific language governing permissions and limitations under the License. * specific language governing permissions and limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.flash; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.flash;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.model; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.redirectedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.redirectedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.io.IOException; import java.io.IOException;
import java.security.Principal; import java.security.Principal;
...@@ -33,7 +33,7 @@ import javax.validation.Valid; ...@@ -33,7 +33,7 @@ import javax.validation.Valid;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import javax.validation.Valid; import javax.validation.Valid;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.validation.Errors; import org.springframework.validation.Errors;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
...@@ -26,8 +26,8 @@ import org.springframework.http.HttpHeaders; ...@@ -26,8 +26,8 @@ import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.mock.web.MockHttpServletRequest; import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.mock.servlet.request.RequestPostProcessor; import org.springframework.test.web.servlet.request.RequestPostProcessor;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
......
...@@ -13,18 +13,18 @@ ...@@ -13,18 +13,18 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
......
...@@ -14,16 +14,16 @@ ...@@ -14,16 +14,16 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
......
...@@ -14,18 +14,18 @@ ...@@ -14,18 +14,18 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone; package org.springframework.test.web.servlet.samples.standalone;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.hasProperty; import static org.hamcrest.Matchers.hasProperty;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.content; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.forwardedUrl; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.forwardedUrl;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.model; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.model;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.xpath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.xpath;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
...@@ -34,8 +34,8 @@ import org.junit.Test; ...@@ -34,8 +34,8 @@ import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.oxm.jaxb.Jaxb2Marshaller; import org.springframework.oxm.jaxb.Jaxb2Marshaller;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.ui.Model; import org.springframework.ui.Model;
import org.springframework.web.accept.ContentNegotiationManager; import org.springframework.web.accept.ContentNegotiationManager;
import org.springframework.web.accept.FixedContentNegotiationStrategy; import org.springframework.web.accept.FixedContentNegotiationStrategy;
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resulthandlers; package org.springframework.test.web.servlet.samples.standalone.resulthandlers;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resultmatchers; package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.*; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.*;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.*; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.*;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
......
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resultmatchers; package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.startsWith; import static org.hamcrest.Matchers.startsWith;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.cookie; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.cookie;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.i18n.CookieLocaleResolver; import org.springframework.web.servlet.i18n.CookieLocaleResolver;
import org.springframework.web.servlet.i18n.LocaleChangeInterceptor; import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;
......
...@@ -14,23 +14,23 @@ ...@@ -14,23 +14,23 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resultmatchers; package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import static org.hamcrest.Matchers.closeTo; import static org.hamcrest.Matchers.closeTo;
import static org.hamcrest.Matchers.containsString; import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.flash; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.flash;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.net.URL; import java.net.URL;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.mvc.support.RedirectAttributes; import org.springframework.web.servlet.mvc.support.RedirectAttributes;
......
...@@ -14,22 +14,22 @@ ...@@ -14,22 +14,22 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resultmatchers; package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.not; import static org.hamcrest.Matchers.not;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.handler; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.handler;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
/** /**
......
...@@ -14,21 +14,21 @@ ...@@ -14,21 +14,21 @@
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.test.web.mock.servlet.samples.standalone.resultmatchers; package org.springframework.test.web.servlet.samples.standalone.resultmatchers;
import static org.hamcrest.Matchers.nullValue; import static org.hamcrest.Matchers.nullValue;
import static org.springframework.test.web.mock.servlet.request.MockMvcRequestBuilders.get; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.header; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.header;
import static org.springframework.test.web.mock.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import static org.springframework.test.web.mock.servlet.setup.MockMvcBuilders.standaloneSetup; import static org.springframework.test.web.servlet.setup.MockMvcBuilders.standaloneSetup;
import java.util.Date; import java.util.Date;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.test.web.mock.Person; import org.springframework.test.web.Person;
import org.springframework.test.web.mock.servlet.MockMvc; import org.springframework.test.web.servlet.MockMvc;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody; import org.springframework.web.bind.annotation.ResponseBody;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册