Search in sources :

Example 1 with MockMvcClientHttpRequestFactory

use of org.springframework.test.web.client.MockMvcClientHttpRequestFactory in project spring-framework by spring-projects.

the class MockMvcClientHttpRequestFactoryTests method setup.

@Before
public void setup() {
    MockMvc mockMvc = MockMvcBuilders.webAppContextSetup(this.wac).alwaysExpect(status().isOk()).build();
    this.restTemplate = new RestTemplate(new MockMvcClientHttpRequestFactory(mockMvc));
}
Also used : MockMvcClientHttpRequestFactory(org.springframework.test.web.client.MockMvcClientHttpRequestFactory) RestTemplate(org.springframework.web.client.RestTemplate) MockMvc(org.springframework.test.web.servlet.MockMvc) Before(org.junit.Before)

Aggregations

Before (org.junit.Before)1 MockMvcClientHttpRequestFactory (org.springframework.test.web.client.MockMvcClientHttpRequestFactory)1 MockMvc (org.springframework.test.web.servlet.MockMvc)1 RestTemplate (org.springframework.web.client.RestTemplate)1