Clean up warnings in spring-test

This commit is contained in:
Sam Brannen
2017-04-04 15:53:49 +02:00
parent 51f23cb424
commit 8e84fd0aed
7 changed files with 8 additions and 9 deletions

View File

@@ -89,6 +89,7 @@ class FailingBeforeAndAfterMethodsSpringExtensionTestCase {
return testClasses().map(clazz -> dynamicTest(clazz.getSimpleName(), () -> runTestAndAssertCounters(clazz)));
}
@SuppressWarnings("deprecation")
private void runTestAndAssertCounters(Class<?> testClass) {
Launcher launcher = LauncherFactory.create();
ExceptionTrackingListener listener = new ExceptionTrackingListener();

View File

@@ -24,7 +24,6 @@ import org.junit.rules.ExpectedException;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockAsyncClientHttpRequest;
import static junit.framework.TestCase.assertFalse;
import static org.junit.Assert.assertTrue;
@@ -87,9 +86,10 @@ public class DefaultRequestExpectationTests {
@SuppressWarnings("deprecation")
private ClientHttpRequest createRequest(HttpMethod method, String url) {
try {
return new MockAsyncClientHttpRequest(method, new URI(url));
return new org.springframework.mock.http.client.MockAsyncClientHttpRequest(method, new URI(url));
}
catch (URISyntaxException ex) {
throw new IllegalStateException(ex);

View File

@@ -25,7 +25,6 @@ import org.junit.rules.ExpectedException;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockAsyncClientHttpRequest;
import static org.junit.Assert.assertEquals;
import static org.springframework.http.HttpMethod.GET;
@@ -164,9 +163,10 @@ public class SimpleRequestExpectationManagerTests {
}
@SuppressWarnings("deprecation")
private ClientHttpRequest createRequest(HttpMethod method, String url) {
try {
return new MockAsyncClientHttpRequest(method, new URI(url));
return new org.springframework.mock.http.client.MockAsyncClientHttpRequest(method, new URI(url));
}
catch (URISyntaxException ex) {
throw new IllegalStateException(ex);

View File

@@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.test.web.client;
import java.net.URI;
@@ -24,7 +25,6 @@ import org.junit.rules.ExpectedException;
import org.springframework.http.HttpMethod;
import org.springframework.http.client.ClientHttpRequest;
import org.springframework.mock.http.client.MockAsyncClientHttpRequest;
import static org.junit.Assert.assertEquals;
import static org.springframework.http.HttpMethod.GET;
@@ -122,9 +122,10 @@ public class UnorderedRequestExpectationManagerTests {
}
@SuppressWarnings("deprecation")
private ClientHttpRequest createRequest(HttpMethod method, String url) {
try {
return new MockAsyncClientHttpRequest(method, new URI(url));
return new org.springframework.mock.http.client.MockAsyncClientHttpRequest(method, new URI(url));
}
catch (URISyntaxException ex) {
throw new IllegalStateException(ex);

View File

@@ -17,7 +17,6 @@
package org.springframework.test.web.reactive.server.samples;
import java.net.URI;
import java.time.Duration;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.List;