diff --git a/build.versions b/build.versions index 3ffdf333ae3..759fddcb75b 100644 --- a/build.versions +++ b/build.versions @@ -1,2 +1,2 @@ org.testng.version=5.9.0 -org.junit.version=4.6.0 \ No newline at end of file +org.junit.version=4.7.0 \ No newline at end of file diff --git a/org.springframework.test/.classpath b/org.springframework.test/.classpath index 72753f4ee26..84715c8bae0 100644 --- a/org.springframework.test/.classpath +++ b/org.springframework.test/.classpath @@ -20,7 +20,7 @@ - + diff --git a/org.springframework.test/pom.xml b/org.springframework.test/pom.xml index b0db36fbb36..c6cdb41426c 100644 --- a/org.springframework.test/pom.xml +++ b/org.springframework.test/pom.xml @@ -58,7 +58,7 @@ junit junit - 4.6 + 4.7 commons-logging diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java index 04bdef9ab0b..5473827f5c2 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java @@ -32,7 +32,7 @@ import org.springframework.test.context.support.DirtiesContextTestExecutionListe *

* Abstract base test class which integrates the Spring TestContext * Framework with explicit {@link ApplicationContext} testing support in a - * JUnit 4.6 environment. + * JUnit 4.7 environment. *

*

* Concrete subclasses should typically declare a class-level diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java index f9588c65f5b..a20d9343722 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java @@ -50,7 +50,7 @@ import org.springframework.test.context.junit4.statements.SpringRepeat; *

* SpringJUnit4ClassRunner is a custom extension of * {@link BlockJUnit4ClassRunner} which provides functionality of the - * Spring TestContext Framework to standard JUnit 4.6+ tests by means + * Spring TestContext Framework to standard JUnit 4.7+ tests by means * of the {@link TestContextManager} and associated support classes and * annotations. *

@@ -76,7 +76,7 @@ import org.springframework.test.context.junit4.statements.SpringRepeat; * *

* NOTE: As of Spring 3.0, SpringJUnit4ClassRunner requires - * JUnit 4.6. + * JUnit 4.7. *

* * @author Sam Brannen @@ -249,6 +249,11 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner { } } + private EachTestNotifier makeNotifier(FrameworkMethod method, RunNotifier notifier) { + Description description = describeChild(method); + return new EachTestNotifier(notifier, description); + } + /** * Augments the default JUnit behavior * {@link #withPotentialRepeat(FrameworkMethod, Object, Statement) with diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/package-info.java b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/package-info.java index 5351e4f80e2..c53746ed666 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/junit4/package-info.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/junit4/package-info.java @@ -1,6 +1,6 @@ /** *

Support classes for ApplicationContext-based and transactional - * tests run with JUnit 4.6 and the Spring TestContext Framework.

+ * tests run with JUnit 4.7 and the Spring TestContext Framework.

*/ package org.springframework.test.context.junit4; diff --git a/org.springframework.test/src/main/java/org/springframework/test/context/package-info.java b/org.springframework.test/src/main/java/org/springframework/test/context/package-info.java index ff16d5e6a04..3cd7eb26add 100644 --- a/org.springframework.test/src/main/java/org/springframework/test/context/package-info.java +++ b/org.springframework.test/src/main/java/org/springframework/test/context/package-info.java @@ -4,7 +4,7 @@ * that is agnostic of the actual testing framework in use. The same * techniques and annotation-based configuration used in, for example, a * JUnit 3.8 environment can also be applied to tests written with JUnit - * 4.6, TestNG, etc.

+ * 4.7, TestNG, etc.

* *

In addition to providing generic and extensible testing * infrastructure, the Spring TestContext Framework provides out-of-the-box diff --git a/org.springframework.test/template.mf b/org.springframework.test/template.mf index 1fb6786b5c0..88c239ef5ba 100644 --- a/org.springframework.test/template.mf +++ b/org.springframework.test/template.mf @@ -17,7 +17,7 @@ Import-Template: org.apache.commons.logging.*;version="[1.1.1, 2.0.0)", org.apache.taglibs.standard.*;version="[1.1.0, 2.0.0)";resolution:=optional, org.aspectj.weaver.*;version="[1.5.4, 2.0.0)";resolution:=optional, - org.junit.*;version="[4.6.0, 5.0.0)";resolution:=optional, + org.junit.*;version="[4.7.0, 5.0.0)";resolution:=optional, org.springframework.*;version="[3.0.0, 3.0.1)";resolution:=optional, org.testng.*;version="[5.9.0, 6.0.0)";resolution:=optional, org.w3c.dom.*;version="0";resolution:=optional diff --git a/org.springframework.test/test.iml b/org.springframework.test/test.iml index 9a86872008b..a0339bbe58b 100644 --- a/org.springframework.test/test.iml +++ b/org.springframework.test/test.iml @@ -78,11 +78,11 @@ - + - + diff --git a/spring-framework-reference/src/testing.xml b/spring-framework-reference/src/testing.xml index 4d6b8530781..362beac9d73 100644 --- a/spring-framework-reference/src/testing.xml +++ b/spring-framework-reference/src/testing.xml @@ -622,7 +622,7 @@ public void testProcessWithoutTransaction() { when used in conjunction with JUnit (i.e., with the SpringJUnit4ClassRunner or the JUnit 3.8 - and JUnit 4.6 + and JUnit 4.7 support classes. @@ -813,15 +813,15 @@ public void testProcessRepeatedly() { org.springframework.test.context package) provides generic, annotation-driven unit and integration testing support that is agnostic of the testing framework in use, for example JUnit 3.8, - JUnit 4.6, TestNG 5.9, etc. The TestContext framework also places a + JUnit 4.7, TestNG 5.9, etc. The TestContext framework also places a great deal of importance on convention over configuration with reasonable defaults that can be overridden via annotation-based configuration. In addition to generic testing infrastructure, the TestContext - framework provides explicit support for JUnit 3.8, JUnit 4.6, and + framework provides explicit support for JUnit 3.8, JUnit 4.7, and TestNG 5.9 in the form of abstract support - classes. For JUnit 4.6, the framework also provides a custom + classes. For JUnit 4.7, the framework also provides a custom Runner which allows one to write test classes that are not required to extend a particular class hierarchy. @@ -1112,11 +1112,11 @@ public class ExtendedTest extends BaseTest { Consider the scenario where we have a class, HibernateTitleDao (as outlined in the Goals section). First, let's look - at a JUnit 4.6 based implementation of the test class itself which + at a JUnit 4.7 based implementation of the test class itself which uses @Autowired for field injection (we will look at the application context configuration after all sample code listings). Note: The dependency injection behavior in - the following code listings is not in any way specific to JUnit 4.6. + the following code listings is not in any way specific to JUnit 4.7. The same DI techniques can be used in conjunction with any testing framework. @@ -1525,10 +1525,10 @@ public void updateWithSessionFlush() {

- JUnit 4.6 support classes + JUnit 4.7 support classes The org.springframework.test.context.junit4 - package provides support classes for JUnit 4.6 based test + package provides support classes for JUnit 4.7 based test cases. @@ -1538,7 +1538,7 @@ public void updateWithSessionFlush() { Abstract base test class which integrates the Spring TestContext Framework with explicit ApplicationContext testing support in a - JUnit 4.6 environment. + JUnit 4.7 environment. When you extend AbstractJUnit4SpringContextTests you will @@ -1608,13 +1608,13 @@ public void updateWithSessionFlush() {
- Custom JUnit 4.6 Runner + Custom JUnit 4.7 Runner The Spring TestContext Framework offers - full integration with JUnit 4.6 via a custom runner. By annotating + full integration with JUnit 4.7 via a custom runner. By annotating test classes with @Runwith(SpringJUnit4ClassRunner.class), - developers can implement standard JUnit 4.6 unit and integration + developers can implement standard JUnit 4.7 unit and integration tests and simultaneously reap the benefits of the TestContext framework such as support for loading application contexts, dependency injection of test instances, transactional test method @@ -1733,7 +1733,7 @@ public class SimpleTest { The PetClinic sample application included with the full Spring distribution illustrates several features of the Spring - TestContext Framework in a JUnit 4.6 environment. Most test + TestContext Framework in a JUnit 4.7 environment. Most test functionality is included in the AbstractClinicTests, for which a partial listing is shown below: @@ -1876,7 +1876,7 @@ public class HibernateClinicTests extends AbstractClinicTests { } JUnit: the Spring Framework's unit and integration test suite is written using JUnit 3.8 - and JUnit 4.6 as the testing framework. + and JUnit 4.7 as the testing framework.