mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Polishing contribution
Closes gh-35989
This commit is contained in:
+4
-1
@@ -46,7 +46,10 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
*
|
||||
* @author Rossen Stoyanchev
|
||||
* @since 3.2
|
||||
* @deprecated in favor of {@link RestTestClient#bindTo(MockMvc)}
|
||||
* @deprecated in favor of
|
||||
* {@link org.springframework.test.web.servlet.client.MockMvcClientHttpRequestFactory},
|
||||
* or consider also using {@link RestTestClient#bindTo(MockMvc)} for tests against a
|
||||
* MockMvc server through a test client.
|
||||
*/
|
||||
@Deprecated(since = "7.0")
|
||||
public class MockMvcClientHttpRequestFactory implements ClientHttpRequestFactory {
|
||||
|
||||
+5
-2
@@ -47,12 +47,15 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
|
||||
* @author Rob Worsnop
|
||||
* @since 7.0
|
||||
*/
|
||||
class MockMvcClientHttpRequestFactory implements ClientHttpRequestFactory {
|
||||
public class MockMvcClientHttpRequestFactory implements ClientHttpRequestFactory {
|
||||
|
||||
private final MockMvc mockMvc;
|
||||
|
||||
|
||||
MockMvcClientHttpRequestFactory(MockMvc mockMvc) {
|
||||
/**
|
||||
* Constructor with a MockMvc instance to perform requests with.
|
||||
*/
|
||||
public MockMvcClientHttpRequestFactory(MockMvc mockMvc) {
|
||||
Assert.notNull(mockMvc, "MockMvc must not be null");
|
||||
this.mockMvc = mockMvc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user