Clean up warnings in spring-test
- Deleted unused imports. - Switched from junit.framework.Assert to org.junit.Assert, since the former is deprecated as of JUnit 4.11. - Suppressed warnings for continued deprecated usage of junit.framework.Assert.
This commit is contained in:
parent
2233949a0f
commit
69ace01640
|
@ -15,15 +15,11 @@
|
|||
*/
|
||||
package org.springframework.test.web.client.response;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.net.URI;
|
||||
|
||||
import org.springframework.core.io.Resource;
|
||||
import org.springframework.http.HttpHeaders;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.http.client.ClientHttpRequest;
|
||||
import org.springframework.mock.http.client.MockClientHttpResponse;
|
||||
import org.springframework.test.web.client.ResponseCreator;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
* 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.
|
||||
|
@ -16,7 +16,7 @@
|
|||
|
||||
package org.springframework.test.context.expression;
|
||||
|
||||
import static junit.framework.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
|
|
|
@ -92,6 +92,7 @@ public class FailingBeforeAndAfterMethodsTests {
|
|||
static class AlwaysFailingBeforeTestMethodTestExecutionListener extends AbstractTestExecutionListener {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void beforeTestMethod(TestContext testContext) {
|
||||
junit.framework.Assert.fail("always failing beforeTestMethod()");
|
||||
}
|
||||
|
@ -100,6 +101,7 @@ public class FailingBeforeAndAfterMethodsTests {
|
|||
static class AlwaysFailingAfterTestMethodTestExecutionListener extends AbstractTestExecutionListener {
|
||||
|
||||
@Override
|
||||
@SuppressWarnings("deprecation")
|
||||
public void afterTestMethod(TestContext testContext) {
|
||||
junit.framework.Assert.fail("always failing afterTestMethod()");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue