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:
@@ -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()");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user