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:
Sam Brannen 2012-12-07 12:26:27 +01:00
parent 2233949a0f
commit 69ace01640
3 changed files with 4 additions and 6 deletions

View File

@ -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;
/**

View File

@ -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;

View File

@ -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()");
}