Clean up warnings in the spring-test module
This commit is contained in:
@@ -131,8 +131,7 @@ public class DelegatingWebConnectionTests {
|
||||
WebClient webClient = new WebClient();
|
||||
|
||||
MockMvc mockMvc = MockMvcBuilders.standaloneSetup(TestController.class).build();
|
||||
MockMvcWebConnection mockConnection = new MockMvcWebConnection(mockMvc);
|
||||
mockConnection.setWebClient(webClient);
|
||||
MockMvcWebConnection mockConnection = new MockMvcWebConnection(mockMvc, webClient);
|
||||
|
||||
WebRequestMatcher cdnMatcher = new UrlRegexRequestMatcher(".*?//code.jquery.com/.*");
|
||||
WebConnection httpConnection = new HttpWebConnection(webClient);
|
||||
|
||||
@@ -24,6 +24,7 @@ import com.gargoylesoftware.htmlunit.WebClient;
|
||||
import com.gargoylesoftware.htmlunit.WebConnection;
|
||||
import com.gargoylesoftware.htmlunit.WebRequest;
|
||||
import com.gargoylesoftware.htmlunit.WebResponse;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
@@ -57,19 +58,19 @@ import static org.mockito.Mockito.when;
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration
|
||||
@WebAppConfiguration
|
||||
@SuppressWarnings("rawtypes")
|
||||
public class MockMvcConnectionBuilderSupportTests {
|
||||
|
||||
private final WebClient client = mock(WebClient.class);
|
||||
|
||||
private MockMvcWebConnectionBuilderSupport builder;
|
||||
|
||||
@Autowired
|
||||
private WebApplicationContext wac;
|
||||
|
||||
private WebClient client;
|
||||
|
||||
private MockMvcWebConnectionBuilderSupport builder;
|
||||
|
||||
|
||||
@Before
|
||||
public void setup() {
|
||||
this.client = mock(WebClient.class);
|
||||
when(this.client.getWebConnection()).thenReturn(mock(WebConnection.class));
|
||||
this.builder = new MockMvcWebConnectionBuilderSupport(this.wac) {};
|
||||
}
|
||||
@@ -145,7 +146,6 @@ public class MockMvcConnectionBuilderSupportTests {
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@SuppressWarnings("unused")
|
||||
static class Config {
|
||||
|
||||
@RestController
|
||||
|
||||
Reference in New Issue
Block a user