Skip to content

Commit 8fb53c8

Browse files
committed
[SPR-5995] Updated documentation regarding compatibility with JUnit 4.5, 4.6, and 4.7.
1 parent da3eb58 commit 8fb53c8

File tree

5 files changed

+22
-22
lines changed

5 files changed

+22
-22
lines changed

org.springframework.test/src/main/java/org/springframework/test/context/junit4/AbstractJUnit4SpringContextTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* <p>
3333
* Abstract base test class which integrates the <em>Spring TestContext
3434
* Framework</em> with explicit {@link ApplicationContext} testing support in a
35-
* <strong>JUnit 4.7</strong> environment.
35+
* <strong>JUnit 4.5+</strong> environment.
3636
* </p>
3737
* <p>
3838
* Concrete subclasses should typically declare a class-level

org.springframework.test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
* <p>
5151
* <code>SpringJUnit4ClassRunner</code> is a custom extension of
5252
* {@link BlockJUnit4ClassRunner} which provides functionality of the
53-
* <em>Spring TestContext Framework</em> to standard JUnit 4.7+ tests by means
53+
* <em>Spring TestContext Framework</em> to standard JUnit 4.5+ tests by means
5454
* of the {@link TestContextManager} and associated support classes and
5555
* annotations.
5656
* </p>
@@ -76,7 +76,7 @@
7676
* </ul>
7777
* <p>
7878
* <b>NOTE:</b> As of Spring 3.0, <code>SpringJUnit4ClassRunner</code> requires
79-
* JUnit 4.7.
79+
* JUnit 4.5+.
8080
* </p>
8181
*
8282
* @author Sam Brannen

org.springframework.test/src/main/java/org/springframework/test/context/junit4/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* <p>Support classes for ApplicationContext-based and transactional
3-
* tests run with JUnit 4.7 and the <em>Spring TestContext Framework</em>.</p>
3+
* tests run with JUnit 4.5+ and the <em>Spring TestContext Framework</em>.</p>
44
*/
55

66
package org.springframework.test.context.junit4;

org.springframework.test/src/main/java/org/springframework/test/context/package-info.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* that is agnostic of the actual testing framework in use. The same
55
* techniques and annotation-based configuration used in, for example, a
66
* JUnit 3.8 environment can also be applied to tests written with JUnit
7-
* 4.7, TestNG, etc.</p>
7+
* 4.5+, TestNG, etc.</p>
88
*
99
* <p>In addition to providing generic and extensible testing
1010
* infrastructure, the Spring TestContext Framework provides out-of-the-box

spring-framework-reference/src/testing.xml

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -621,8 +621,8 @@ public void testProcessWithoutTransaction() {
621621
<para>The following annotations are <emphasis>only</emphasis> supported
622622
when used in conjunction with JUnit (i.e., with the <link
623623
linkend="testcontext-junit4-runner">SpringJUnit4ClassRunner</link> or
624-
the <link linkend="testcontext-support-classes-junit38">JUnit 3.8</link>
625-
and <link linkend="testcontext-support-classes-junit4">JUnit 4.7</link>
624+
the <link linkend="testcontext-support-classes-junit38">JUnit 3.8.2</link>
625+
and <link linkend="testcontext-support-classes-junit4">JUnit 4.5+</link>
626626
support classes.</para>
627627

628628
<itemizedlist>
@@ -812,16 +812,16 @@ public void testProcessRepeatedly() {
812812
Framework</emphasis> (located in the
813813
<literal>org.springframework.test.context</literal> package) provides
814814
generic, annotation-driven unit and integration testing support that
815-
is agnostic of the testing framework in use, for example JUnit 3.8,
816-
JUnit 4.7, TestNG 5.10, etc. The TestContext framework also places a
815+
is agnostic of the testing framework in use, for example JUnit 3.8.2,
816+
JUnit 4.5+, TestNG 5.10, etc. The TestContext framework also places a
817817
great deal of importance on <emphasis>convention over
818818
configuration</emphasis> with reasonable defaults that can be
819819
overridden via annotation-based configuration.</para>
820820

821821
<para>In addition to generic testing infrastructure, the TestContext
822-
framework provides explicit support for JUnit 3.8, JUnit 4.7, and
822+
framework provides explicit support for JUnit 3.8.2, JUnit 4.5+, and
823823
TestNG 5.10 in the form of <literal>abstract</literal> support
824-
classes. For JUnit 4.7, the framework also provides a custom
824+
classes. For JUnit 4.5+, the framework also provides a custom
825825
<interfacename>Runner</interfacename> which allows one to write test
826826
classes that are not required to extend a particular class
827827
hierarchy.</para>
@@ -1112,11 +1112,11 @@ public class ExtendedTest extends BaseTest {
11121112
<para>Consider the scenario where we have a class,
11131113
<classname>HibernateTitleDao</classname> (as outlined in the <link
11141114
linkend="testing-fixture-di">Goals</link> section). First, let's look
1115-
at a JUnit 4.7 based implementation of the test class itself which
1115+
at a JUnit 4 based implementation of the test class itself which
11161116
uses <interfacename>@Autowired</interfacename> for field injection (we
11171117
will look at the application context configuration after all sample
11181118
code listings). <emphasis>Note: The dependency injection behavior in
1119-
the following code listings is not in any way specific to JUnit 4.7.
1119+
the following code listings is not in any way specific to JUnit 4.
11201120
The same DI techniques can be used in conjunction with any testing
11211121
framework.</emphasis></para>
11221122

@@ -1525,10 +1525,10 @@ public void updateWithSessionFlush() {
15251525
</section>
15261526

15271527
<section id="testcontext-support-classes-junit4">
1528-
<title>JUnit 4.7 support classes</title>
1528+
<title>JUnit 4.5+ support classes</title>
15291529

15301530
<para>The <literal>org.springframework.test.context.junit4</literal>
1531-
package provides support classes for JUnit 4.7 based test
1531+
package provides support classes for JUnit 4.5+ based test
15321532
cases.</para>
15331533

15341534
<itemizedlist>
@@ -1538,7 +1538,7 @@ public void updateWithSessionFlush() {
15381538
<para>Abstract base test class which integrates the
15391539
<emphasis>Spring TestContext Framework</emphasis> with explicit
15401540
<classname>ApplicationContext</classname> testing support in a
1541-
JUnit 4.7 environment.</para>
1541+
JUnit 4.5+ environment.</para>
15421542

15431543
<para>When you extend
15441544
<classname>AbstractJUnit4SpringContextTests</classname> you will
@@ -1608,13 +1608,13 @@ public void updateWithSessionFlush() {
16081608
</section>
16091609

16101610
<section id="testcontext-junit4-runner">
1611-
<title>Custom JUnit 4.7 Runner</title>
1611+
<title>Custom JUnit 4.5+ Runner</title>
16121612

16131613
<para>The <emphasis>Spring TestContext Framework</emphasis> offers
1614-
full integration with JUnit 4.7 via a custom runner. By annotating
1615-
test classes with
1614+
full integration with JUnit 4.5+ via a custom runner (tested on
1615+
JUnit 4.5, 4.6, and 4.7). By annotating test classes with
16161616
<literal>@Runwith(SpringJUnit4ClassRunner.class)</literal>,
1617-
developers can implement standard JUnit 4.7 unit and integration
1617+
developers can implement standard JUnit 4.5+ unit and integration
16181618
tests and simultaneously reap the benefits of the TestContext
16191619
framework such as support for loading application contexts,
16201620
dependency injection of test instances, transactional test method
@@ -1733,7 +1733,7 @@ public class SimpleTest {
17331733

17341734
<para>The PetClinic sample application included with the full Spring
17351735
distribution illustrates several features of the <emphasis>Spring
1736-
TestContext Framework</emphasis> in a JUnit 4.7 environment. Most test
1736+
TestContext Framework</emphasis> in a JUnit 4.5+ environment. Most test
17371737
functionality is included in the
17381738
<classname>AbstractClinicTests</classname>, for which a partial listing
17391739
is shown below:</para>
@@ -1875,7 +1875,7 @@ public class HibernateClinicTests extends AbstractClinicTests { }
18751875
<itemizedlist>
18761876
<listitem>
18771877
<para><ulink url="http://www.junit.org/">JUnit</ulink>: the Spring
1878-
Framework's unit and integration test suite is written using JUnit 3.8
1878+
Framework's unit and integration test suite is written using JUnit 3.8.2
18791879
and JUnit 4.7 as the testing framework.</para>
18801880
</listitem>
18811881

0 commit comments

Comments
 (0)