From 8e9a553517de71a21415f5d3e44b87e6024b609a Mon Sep 17 00:00:00 2001 From: Sam Brannen Date: Sat, 26 Nov 2022 16:48:03 +0100 Subject: [PATCH] Update Javadoc regarding JUnit versions --- .../test/context/junit4/SpringJUnit4ClassRunner.java | 7 +++---- .../test/context/junit4/SpringRunner.java | 4 ++-- .../test/context/junit4/rules/SpringClassRule.java | 4 ++-- .../test/context/junit4/rules/SpringMethodRule.java | 4 ++-- .../statements/RunBeforeTestExecutionCallbacks.java | 4 +++- .../TestContextManagerSuppressedExceptionsTests.java | 4 ++-- .../test/context/TestContextManagerTests.java | 9 ++++----- .../junit/jupiter/ComposedSpringExtensionTests.java | 6 +----- .../context/junit/jupiter/DisabledIfConditionTests.java | 6 +----- .../test/context/junit/jupiter/DisabledIfTests.java | 6 +----- .../test/context/junit/jupiter/EnabledIfTests.java | 6 +----- ...FailingBeforeAndAfterMethodsSpringExtensionTests.java | 6 +----- .../jupiter/RegisterExtensionSpringExtensionTests.java | 5 ----- .../junit/jupiter/SpringExtensionParameterizedTests.java | 6 +----- .../test/context/junit/jupiter/SpringExtensionTests.java | 4 ---- ...ngJUnitJupiterAutowiredConstructorInjectionTests.java | 6 +----- .../SpringJUnitJupiterConstructorInjectionTests.java | 6 +----- .../TestConstructorAnnotationIntegrationTests.java | 6 +----- .../defaultmethods/CatInterfaceDefaultMethodsTests.java | 6 +----- .../defaultmethods/DogInterfaceDefaultMethodsTests.java | 6 +----- ...nericComicCharactersInterfaceDefaultMethodsTests.java | 6 +----- .../test/context/junit/jupiter/generics/CatTests.java | 6 +----- .../test/context/junit/jupiter/generics/DogTests.java | 6 +----- .../jupiter/generics/GenericComicCharactersTests.java | 6 +----- .../junit/jupiter/generics/GenericsAndNestedTests.java | 7 +------ .../jupiter/nested/ConstructorInjectionNestedTests.java | 7 +------ .../web/MultipleWebRequestsSpringExtensionTests.java | 6 +----- .../junit/jupiter/web/WebSpringExtensionTests.java | 6 +----- 28 files changed, 37 insertions(+), 124 deletions(-) diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java index 66e9c3a16ba..904618a68d1 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringJUnit4ClassRunner.java @@ -59,7 +59,7 @@ import org.springframework.util.ReflectionUtils; * Spring TestContext Framework to standard JUnit tests by means of the * {@link TestContextManager} and associated support classes and annotations. * - *

To use this class, simply annotate a JUnit 4 based test class with + *

To use this class, annotate a JUnit 4 based test class with * {@code @RunWith(SpringJUnit4ClassRunner.class)} or {@code @RunWith(SpringRunner.class)}. * *

The following list constitutes all annotations currently supported directly @@ -82,7 +82,7 @@ import org.springframework.util.ReflectionUtils; *

If you would like to use the Spring TestContext Framework with a runner * other than this one, use {@link SpringClassRule} and {@link SpringMethodRule}. * - *

NOTE: As of Spring Framework 4.3, this class requires JUnit 4.12 or higher. + *

NOTE: This class requires JUnit 4.12 or higher. * * @author Sam Brannen * @author Juergen Hoeller @@ -268,8 +268,7 @@ public class SpringJUnit4ClassRunner extends BlockJUnit4ClassRunner { * JUnit-specified timeouts will work fine in combination with Spring * transactions. However, JUnit-specific timeouts still differ from * Spring-specific timeouts in that the former execute in a separate - * thread while the latter simply execute in the main thread (like regular - * tests). + * thread while the latter execute in the main thread (like regular tests). * @see #methodInvoker(FrameworkMethod, Object) * @see #withBeforeTestExecutionCallbacks(FrameworkMethod, Object, Statement) * @see #withAfterTestExecutionCallbacks(FrameworkMethod, Object, Statement) diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringRunner.java b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringRunner.java index b6d87e566b2..dd6ca659bc9 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/SpringRunner.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/SpringRunner.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2016 the original author or authors. + * Copyright 2002-2022 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,7 +21,7 @@ import org.junit.runners.model.InitializationError; /** * {@code SpringRunner} is an alias for the {@link SpringJUnit4ClassRunner}. * - *

To use this class, simply annotate a JUnit 4 based test class with + *

To use this class, annotate a JUnit 4 based test class with * {@code @RunWith(SpringRunner.class)}. * *

If you would like to use the Spring TestContext Framework with a runner other than diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringClassRule.java b/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringClassRule.java index 90bae04ef82..f2c5f31dce9 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringClassRule.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringClassRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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. @@ -72,7 +72,7 @@ import org.springframework.util.Assert; *

  • {@link org.springframework.test.annotation.IfProfileValue @IfProfileValue}
  • * * - *

    NOTE: As of Spring Framework 4.3, this class requires JUnit 4.12 or higher. + *

    NOTE: This class requires JUnit 4.12 or higher. * * @author Sam Brannen * @author Philippe Marschall diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java b/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java index 57478d4bd8a..bb205c7cd82 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/rules/SpringMethodRule.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2021 the original author or authors. + * Copyright 2002-2022 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. @@ -76,7 +76,7 @@ import org.springframework.test.context.junit4.statements.SpringRepeat; *

  • {@link org.springframework.test.annotation.IfProfileValue @IfProfileValue}
  • * * - *

    NOTE: As of Spring Framework 4.3, this class requires JUnit 4.12 or higher. + *

    NOTE: This class requires JUnit 4.12 or higher. * *

    WARNING: Due to the shortcomings of JUnit rules, the * {@code SpringMethodRule} diff --git a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java index 344ec19d3e3..f95eb5a3823 100644 --- a/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java +++ b/spring-test/src/main/java/org/springframework/test/context/junit4/statements/RunBeforeTestExecutionCallbacks.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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. @@ -28,6 +28,8 @@ import org.springframework.test.context.TestContextManager; * JUnit 4 execution chain by calling {@link TestContextManager#beforeTestExecution * beforeTestExecution()} on the supplied {@link TestContextManager}. * + *

    NOTE: This class requires JUnit 4.9 or higher. + * * @author Sam Brannen * @since 5.0 * @see #evaluate() diff --git a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerSuppressedExceptionsTests.java b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerSuppressedExceptionsTests.java index 6b6396bd137..5cb3490731f 100644 --- a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerSuppressedExceptionsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerSuppressedExceptionsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.fail; /** - * JUnit 4 based unit tests for {@link TestContextManager}, which verify proper + * JUnit Jupiter based unit tests for {@link TestContextManager}, which verify proper * support for suppressed exceptions thrown by {@link TestExecutionListener * TestExecutionListeners}. * diff --git a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java index c61ad4ab8d8..8d7481da19e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/TestContextManagerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -18,7 +18,6 @@ package org.springframework.test.context; import java.lang.reflect.Method; import java.util.ArrayList; -import java.util.Arrays; import java.util.List; import org.junit.jupiter.api.Test; @@ -26,7 +25,7 @@ import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; /** - * JUnit 4 based unit test for {@link TestContextManager}, which verifies proper + * JUnit Jupiter based unit test for {@link TestContextManager}, which verifies proper * execution order of registered {@link TestExecutionListener * TestExecutionListeners}. * @@ -53,7 +52,7 @@ class TestContextManagerTests { @Test void listenerExecutionOrder() throws Exception { // @formatter:off - assertThat(this.testContextManager.getTestExecutionListeners().size()).as("Registered TestExecutionListeners").isEqualTo(3); + assertThat(this.testContextManager.getTestExecutionListeners()).as("Registered TestExecutionListeners").hasSize(3); this.testContextManager.beforeTestMethod(this, this.testMethod); assertExecutionOrder("beforeTestMethod", @@ -104,7 +103,7 @@ class TestContextManagerTests { } private static void assertExecutionOrder(String usageContext, String... expectedBeforeTestMethodCalls) { - assertThat(executionOrder).as("execution order (" + usageContext + ") ==>").isEqualTo(Arrays.asList(expectedBeforeTestMethodCalls)); + assertThat(executionOrder).as("execution order (" + usageContext + ") ==>").containsExactly(expectedBeforeTestMethodCalls); } diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTests.java index d10617fc431..c62cd004ef0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/ComposedSpringExtensionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -25,7 +25,6 @@ import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Person; import static org.assertj.core.api.Assertions.assertThat; @@ -38,9 +37,6 @@ import static org.assertj.core.api.Assertions.assertThat; * with JUnit Jupiter's {@link ExtendWith @ExtendWith} and Spring's * {@link ContextConfiguration @ContextConfiguration}. * - *

    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 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTests.java index 77d375f362f..6663276540c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfConditionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -26,7 +26,6 @@ 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.assertj.core.api.Assertions.assertThat; @@ -40,9 +39,6 @@ import static org.mockito.Mockito.mock; * results and exception handling; whereas, {@link DisabledIfTests} 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 DisabledIfTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTests.java index 1e3f61c3698..d98c5499dcb 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/DisabledIfTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +22,6 @@ 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.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -31,9 +30,6 @@ import static org.assertj.core.api.Assertions.fail; * Integration tests which verify support for {@link DisabledIf @DisabledIf} * 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 * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTests.java index afccc93e8f2..c10198669ff 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/EnabledIfTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +22,6 @@ 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.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.fail; @@ -31,9 +30,6 @@ import static org.assertj.core.api.Assertions.fail; * Integration tests which verify support for {@link EnabledIf @EnabledIf} * 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 * @since 5.0 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTests.java index bb40b566993..92dfb4532a8 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/FailingBeforeAndAfterMethodsSpringExtensionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 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,7 +32,6 @@ 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; @@ -58,9 +57,6 @@ import static org.junit.platform.testkit.engine.TestExecutionResultConditions.me *

    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/RegisterExtensionSpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/RegisterExtensionSpringExtensionTests.java index 7c3783db041..8b34cea6df4 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/RegisterExtensionSpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/RegisterExtensionSpringExtensionTests.java @@ -31,7 +31,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Cat; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -43,10 +42,6 @@ import static org.assertj.core.api.Assertions.assertThat; * with JUnit Jupiter by registering the {@link SpringExtension} via a static field. * Note, however, that this is not the recommended way to register the {@code 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.1 * @see SpringExtensionTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionParameterizedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionParameterizedTests.java index ac2326febcc..fc3165b0b04 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionParameterizedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionParameterizedTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -24,7 +24,6 @@ import org.junit.jupiter.params.provider.ValueSource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.ApplicationContext; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Cat; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -36,9 +35,6 @@ import static org.assertj.core.api.Assertions.assertThat; * can be used with JUnit Jupiter's {@link ParameterizedTest @ParameterizedTest} * support in conjunction with 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 * @see SpringExtension diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTests.java index ee67fa14c9b..56100f02d62 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringExtensionTests.java @@ -31,7 +31,6 @@ import org.springframework.context.ApplicationContext; import org.springframework.context.support.GenericApplicationContext; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Cat; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -42,9 +41,6 @@ import static org.assertj.core.api.Assertions.assertThat; * 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 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 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTests.java index 7796587d3f3..78ba6cbe39c 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterAutowiredConstructorInjectionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +22,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -32,9 +31,6 @@ import static org.assertj.core.api.Assertions.assertThat; * Integration tests which demonstrate support for {@link Autowired @Autowired} * test class constructors with the Spring TestContext Framework and JUnit Jupiter. * - *

    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 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTests.java index 029bda128ff..705152a6d95 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/SpringJUnitJupiterConstructorInjectionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +23,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -34,9 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; * parameters in test class constructors using {@link Autowired @Autowired} * and {@link Value @Value} with the Spring TestContext Framework and JUnit Jupiter. * - *

    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 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConstructorAnnotationIntegrationTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConstructorAnnotationIntegrationTests.java index 7faa8450274..5c931cf2cf0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConstructorAnnotationIntegrationTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/TestConstructorAnnotationIntegrationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +23,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.ApplicationContext; import org.springframework.test.context.TestConstructor; import org.springframework.test.context.TestPropertySource; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.comics.Dog; import org.springframework.test.context.junit.jupiter.comics.Person; @@ -35,9 +34,6 @@ import static org.springframework.test.context.TestConstructor.AutowireMode.ALL; * {@link Autowired @Autowired} test class constructors in conjunction with the * {@link TestConstructor @TestConstructor} annotation * - *

    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.2 * @see SpringExtension diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTests.java index d8ee9277d2b..12fcca90075 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/CatInterfaceDefaultMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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,6 @@ 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; @@ -25,9 +24,6 @@ import org.springframework.test.context.junit.jupiter.comics.Cat; * 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/DogInterfaceDefaultMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTests.java index ba5350a3fc1..d2f30cd7776 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/DogInterfaceDefaultMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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,6 @@ 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; @@ -25,9 +24,6 @@ import org.springframework.test.context.junit.jupiter.comics.Dog; * 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/GenericComicCharactersInterfaceDefaultMethodsTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTests.java index 5fdbafba293..4781d0edcbd 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/defaultmethods/GenericComicCharactersInterfaceDefaultMethodsTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +21,6 @@ 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; @@ -34,9 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; * 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/CatTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTests.java index b8c89eb68ba..994407076f0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/CatTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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,6 @@ 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; @@ -25,9 +24,6 @@ import org.springframework.test.context.junit.jupiter.comics.Cat; * 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/DogTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTests.java index f69f57712d8..413d902e2e0 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/DogTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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,6 @@ 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; @@ -25,9 +24,6 @@ import org.springframework.test.context.junit.jupiter.comics.Dog; * 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/GenericComicCharactersTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTests.java index 3957d9a5b9c..eb68fed7fd2 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericComicCharactersTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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,7 +21,6 @@ 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; @@ -34,9 +33,6 @@ import static org.assertj.core.api.Assertions.assertThat; * 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/GenericsAndNestedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericsAndNestedTests.java index 8c5990b3150..1fdade3b05e 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericsAndNestedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/generics/GenericsAndNestedTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2018 the original author or authors. + * Copyright 2002-2022 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. @@ -18,7 +18,6 @@ package org.springframework.test.context.junit.jupiter.generics; import org.junit.jupiter.api.Nested; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.context.junit.jupiter.comics.Cat; import org.springframework.test.context.junit.jupiter.comics.Dog; @@ -28,10 +27,6 @@ import org.springframework.test.context.junit.jupiter.comics.Dog; * 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.5 */ diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/ConstructorInjectionNestedTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/ConstructorInjectionNestedTests.java index 2cd988ae8a0..61be8f3b961 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/ConstructorInjectionNestedTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/nested/ConstructorInjectionNestedTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2020 the original author or authors. + * Copyright 2002-2022 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. @@ -26,7 +26,6 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.test.context.NestedTestConfiguration; -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.ConstructorInjectionNestedTests.TopLevelConfig; @@ -39,10 +38,6 @@ import static org.springframework.test.context.NestedTestConfiguration.Enclosing * with the {@link SpringExtension} in a JUnit Jupiter environment ... when using * constructor injection as opposed to field injection (see SPR-16653). * - *

    - * 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.5 * @see ContextConfigurationNestedTests diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTests.java index b12292b099d..5853421d3fd 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/MultipleWebRequestsSpringExtensionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -20,7 +20,6 @@ import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; import org.springframework.web.context.WebApplicationContext; @@ -39,9 +38,6 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC * {@link SpringExtension} (registered via a custom * {@link SpringJUnitWebConfig @SpringJUnitWebConfig} composed annotation). * - *

    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 diff --git a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTests.java b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTests.java index f07ca2fc5ff..134078bc458 100644 --- a/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTests.java +++ b/spring-test/src/test/java/org/springframework/test/context/junit/jupiter/web/WebSpringExtensionTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2002-2019 the original author or authors. + * Copyright 2002-2022 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. @@ -20,7 +20,6 @@ import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.Test; import org.springframework.http.MediaType; -import org.springframework.test.context.junit.SpringJUnitJupiterTestSuite; import org.springframework.test.context.junit.jupiter.SpringExtension; import org.springframework.test.web.servlet.MockMvc; import org.springframework.web.context.WebApplicationContext; @@ -42,9 +41,6 @@ import static org.springframework.test.web.servlet.setup.MockMvcBuilders.webAppC * 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 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