From 2b03507894eeefc824fe0c06ecb4156607ea4787 Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Fri, 7 Jul 2017 16:11:52 +0200 Subject: [PATCH] Polishing wording regarding JUnit Platform and JUnit Jupiter --- .../context/junit/SpringJUnitJupiterTestSuite.java | 2 +- .../jupiter/ComposedSpringExtensionTestCase.java | 6 +++--- .../junit/jupiter/DisabledIfConditionTestCase.java | 4 ++++ .../context/junit/jupiter/DisabledIfTestCase.java | 9 ++++++--- .../context/junit/jupiter/EnabledIfTestCase.java | 9 ++++++--- ...foreAndAfterMethodsSpringExtensionTestCase.java | 8 ++++++-- .../junit/jupiter/SpringExtensionTestCase.java | 6 +++--- ...iterAutowiredConstructorInjectionTestCase.java} | 14 +++++++------- ...gJUnitJupiterConstructorInjectionTestCase.java} | 14 +++++++------- .../CatInterfaceDefaultMethodsTestCase.java | 8 ++++++-- .../DogInterfaceDefaultMethodsTestCase.java | 8 ++++++-- ...cCharactersInterfaceDefaultMethodsTestCase.java | 6 +++++- .../junit/jupiter/generics/CatTestCase.java | 8 ++++++-- .../junit/jupiter/generics/DogTestCase.java | 8 ++++++-- .../generics/GenericComicCharactersTestCase.java | 8 ++++++-- ...stedTestsWithSpringAndJUnitJupiterTestCase.java | 9 ++++++--- ...MultipleWebRequestsSpringExtensionTestCase.java | 6 +++--- .../jupiter/web/WebSpringExtensionTestCase.java | 6 +++--- 18 files changed, 90 insertions(+), 49 deletions(-) rename spring-test/src/test/java/org/springframework/test/context/junit/jupiter/{SpringJUnit5AutowiredConstructorInjectionTestCase.java => SpringJUnitJupiterAutowiredConstructorInjectionTestCase.java} (83%) rename spring-test/src/test/java/org/springframework/test/context/junit/jupiter/{SpringJUnit5ConstructorInjectionTestCase.java => SpringJUnitJupiterConstructorInjectionTestCase.java} (85%) diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/SpringJUnitJupiterTestSuite.java b/spring-test/src/test/java/org/springframework/test/context/junit/SpringJUnitJupiterTestSuite.java index e89d5800a25..77c9ca4c1be 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/SpringJUnitJupiterTestSuite.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/SpringJUnitJupiterTestSuite.java @@ -25,7 +25,7 @@ import org.junit.runner.RunWith; /** * JUnit 4 based test suite for tests that involve the Spring TestContext - * Framework and JUnit Jupiter (a.k.a., JUnit 5). + * Framework and JUnit Jupiter (i.e., JUnit 5's programming model). * *

This class intentionally does not reside in the "jupiter" package * so that the entire "jupiter" package can be excluded from the Gradle diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTestCase.java index 5644bce036f..9d337331915 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -38,8 +38,8 @@ import static org.junit.jupiter.api.Assertions.*; * with JUnit Jupiter's {@link ExtendWith @ExtendWith} and Spring's * {@link ContextConfiguration @ContextConfiguration}. * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTestCase.java index ec7471d2e09..0f9f28e89f3 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTestCase.java @@ -28,6 +28,7 @@ import org.junit.jupiter.api.extension.ExtensionContext.Store; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.TestContextManager; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.util.ReflectionUtils; import static org.hamcrest.CoreMatchers.*; @@ -42,6 +43,9 @@ import static org.mockito.Mockito.*; * results and exception handling; whereas, {@link DisabledIfTestCase} only tests * the happy paths. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 * @see DisabledIfTestCase diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTestCase.java index 497324be547..1d2924ac8d2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -22,14 +22,17 @@ import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.fail; /** * Integration tests which verify support for {@link DisabledIf @DisabledIf} - * in conjunction with the {@link SpringExtension} in a JUnit 5 (Jupiter) - * environment. + * in conjunction with the {@link SpringExtension} in a JUnit Jupiter environment. + * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Tadaya Tsuyukubo * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTestCase.java index cb6a8753bb1..9aa042d1c9a 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.TestPropertySource; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import static org.junit.jupiter.api.Assertions.assertFalse; import static org.junit.jupiter.api.Assertions.assertTrue; @@ -29,8 +30,10 @@ import static org.junit.jupiter.api.Assertions.fail; /** * Integration tests which verify support for {@link EnabledIf @EnabledIf} - * in conjunction with the {@link SpringExtension} in a JUnit 5 (Jupiter) - * environment. + * in conjunction with the {@link SpringExtension} in a JUnit Jupiter environment. + * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Tadaya Tsuyukubo * @author Sam Brannen diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTestCase.java index cd9d2a76ca7..6051b73b04e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -42,6 +42,7 @@ import org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseBuilder; import org.springframework.test.context.TestContext; import org.springframework.test.context.TestExecutionListener; import org.springframework.test.context.TestExecutionListeners; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.transaction.AfterTransaction; import org.springframework.test.context.transaction.BeforeTransaction; import org.springframework.transaction.PlatformTransactionManager; @@ -56,7 +57,7 @@ import static org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.* * Integration tests which verify that 'before' and 'after' * methods of {@link TestExecutionListener TestExecutionListeners} as well as * {@code @BeforeTransaction} and {@code @AfterTransaction} methods can fail - * tests run via the {@link SpringExtension} in a JUnit 5 (Jupiter) environment. + * tests run via the {@link SpringExtension} in a JUnit Jupiter environment. * *

See: SPR-3960 * and SPR-4365. @@ -64,6 +65,9 @@ import static org.junit.platform.launcher.core.LauncherDiscoveryRequestBuilder.* *

Indirectly, this class also verifies that all {@code TestExecutionListener} * lifecycle callbacks are called. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTestCase.java index 2ca3bf59cab..01ce094d3ed 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -42,8 +42,8 @@ import static org.junit.jupiter.api.Assertions.*; * Integration tests which demonstrate that the Spring TestContext Framework can * be used with JUnit Jupiter via the {@link SpringExtension}. * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5AutowiredConstructorInjectionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTestCase.java similarity index 83% rename from spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5AutowiredConstructorInjectionTestCase.java rename to spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTestCase.java index dbc6a2f0f5f..68913689ab4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5AutowiredConstructorInjectionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -30,19 +30,19 @@ import static org.junit.jupiter.api.Assertions.*; /** * Integration tests which demonstrate support for {@link Autowired @Autowired} - * test class constructors with the Spring TestContext Framework and JUnit 5. + * test class constructors with the Spring TestContext Framework and JUnit Jupiter. * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 * @see SpringExtension - * @see SpringJUnit5ConstructorInjectionTestCase + * @see SpringJUnitJupiterConstructorInjectionTestCase */ @SpringJUnitConfig(TestConfig.class) @TestPropertySource(properties = "enigma = 42") -class SpringJUnit5AutowiredConstructorInjectionTestCase { +class SpringJUnitJupiterAutowiredConstructorInjectionTestCase { final ApplicationContext applicationContext; final Person dilbert; @@ -50,7 +50,7 @@ class SpringJUnit5AutowiredConstructorInjectionTestCase { final Integer enigma; @Autowired - SpringJUnit5AutowiredConstructorInjectionTestCase(ApplicationContext applicationContext, Person dilbert, Dog dog, + SpringJUnitJupiterAutowiredConstructorInjectionTestCase(ApplicationContext applicationContext, Person dilbert, Dog dog, @Value("${enigma}") Integer enigma) { this.applicationContext = applicationContext; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5ConstructorInjectionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTestCase.java similarity index 85% rename from spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5ConstructorInjectionTestCase.java rename to spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTestCase.java index 6725163fe15..1dd233fe4c1 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnit5ConstructorInjectionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -32,19 +32,19 @@ import static org.junit.jupiter.api.Assertions.*; /** * Integration tests which demonstrate support for autowiring individual * parameters in test class constructors using {@link Autowired @Autowired} - * and {@link Value @Value} with the Spring TestContext Framework and JUnit 5. + * and {@link Value @Value} with the Spring TestContext Framework and JUnit Jupiter. * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 * @see SpringExtension - * @see SpringJUnit5AutowiredConstructorInjectionTestCase + * @see SpringJUnitJupiterAutowiredConstructorInjectionTestCase */ @SpringJUnitConfig(TestConfig.class) @TestPropertySource(properties = "enigma = 42") -class SpringJUnit5ConstructorInjectionTestCase { +class SpringJUnitJupiterConstructorInjectionTestCase { final ApplicationContext applicationContext; final Person dilbert; @@ -52,7 +52,7 @@ class SpringJUnit5ConstructorInjectionTestCase { final Integer enigma; final TestInfo testInfo; - SpringJUnit5ConstructorInjectionTestCase(ApplicationContext applicationContext, @Autowired Person dilbert, + SpringJUnitJupiterConstructorInjectionTestCase(ApplicationContext applicationContext, @Autowired Person dilbert, @Autowired Dog dog, @Value("${enigma}") Integer enigma, TestInfo testInfo) { this.applicationContext = applicationContext; diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTestCase.java index d72660c9d4a..efeac090b90 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,14 +16,18 @@ package org.springframework.test.context.junit.jupiter.defaultmethods; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.comics.Cat; /** * Parameterized test class for integration tests that demonstrate support for - * interface default methods and Java generics in JUnit 5 test classes when used + * interface default methods and Java generics in JUnit Jupiter test classes when used * with the Spring TestContext Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTestCase.java index 9270476589d..0d08aad1588 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,14 +16,18 @@ package org.springframework.test.context.junit.jupiter.defaultmethods; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.comics.Dog; /** * Parameterized test class for integration tests that demonstrate support for - * interface default methods and Java generics in JUnit 5 test classes when used + * interface default methods and Java generics in JUnit Jupiter test classes when used * with the Spring TestContext Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTestCase.java index 4bd4d511f6a..0ab5927e4e9 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -21,6 +21,7 @@ import java.util.List; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import org.springframework.test.context.junit.jupiter.TestConfig; @@ -33,6 +34,9 @@ import static org.junit.jupiter.api.Assertions.*; * methods and Java generics in JUnit Jupiter test classes when used with the Spring * TestContext Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTestCase.java index ab2b6b87b0b..6632892bbdb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,14 +16,18 @@ package org.springframework.test.context.junit.jupiter.generics; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.comics.Cat; /** * Parameterized test class for integration tests that demonstrate support for - * Java generics in JUnit 5 test classes when used with the Spring TestContext + * Java generics in JUnit Jupiter test classes when used with the Spring TestContext * Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTestCase.java index a07256cb15b..b1df3a9d319 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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,14 +16,18 @@ package org.springframework.test.context.junit.jupiter.generics; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.comics.Dog; /** * Parameterized test class for integration tests that demonstrate support for - * Java generics in JUnit 5 test classes when used with the Spring TestContext + * Java generics in JUnit Jupiter test classes when used with the Spring TestContext * Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTestCase.java index ce6bc237979..67ac61dd5a0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -23,6 +23,7 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.TestConfig; import org.springframework.test.context.junit.jupiter.comics.Character; @@ -31,9 +32,12 @@ import static org.junit.jupiter.api.Assertions.*; /** * Abstract base class for integration tests that demonstrate support for - * Java generics in JUnit 5 test classes when used with the Spring TestContext + * Java generics in JUnit Jupiter test classes when used with the Spring TestContext * Framework and the {@link SpringExtension}. * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. + * * @author Sam Brannen * @since 5.0 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java index 15b66132466..68fe8cf8fb0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/NestedTestsWithSpringAndJUnitJupiterTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -22,6 +22,7 @@ import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; +import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.SpringJUnitConfig; import org.springframework.test.context.junit.jupiter.nested.NestedTestsWithSpringAndJUnitJupiterTestCase.TopLevelConfig; @@ -30,8 +31,10 @@ import static org.junit.jupiter.api.Assertions.assertEquals; /** * Integration tests that verify support for {@code @Nested} test classes - * in conjunction with the {@link SpringExtension} in a JUnit 5 (Jupiter) - * environment. + * in conjunction with the {@link SpringExtension} in a JUnit Jupiter environment. + * + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTestCase.java index a3d1b9fcd25..328817dfc43 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -37,8 +37,8 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*; * {@link SpringExtension} (registered via a custom * {@link SpringJUnitWebConfig @SpringJUnitWebConfig} composed annotation). * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTestCase.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTestCase.java index 7fe7e616e70..07c8b4eca99 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTestCase.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTestCase.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2017 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. @@ -41,8 +41,8 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.*; * This allows the {@link MockMvc} instance to be configured local to the * test method without any fields in the test class. * - *

To run these tests in an IDE, simply run {@link SpringJUnitJupiterTestSuite} - * as a JUnit 4 test. + *

To run these tests in an IDE that does not have built-in support for the JUnit + * Platform, simply run {@link SpringJUnitJupiterTestSuite} as a JUnit 4 test. * * @author Sam Brannen * @since 5.0