Polish tests for the SpringExtension

This commit is contained in:
Sam Brannen
2025-10-27 12:18:36 +01:00
parent 1ea043db28
commit 65daea1e2a
5 changed files with 3 additions and 7 deletions
@@ -158,7 +158,6 @@ class ActiveProfilesTestClassScopedExtensionContextNestedTests {
}
}
}
}
// -------------------------------------------------------------------------
@@ -88,7 +88,7 @@ class ContextConfigurationTestClassScopedExtensionContextNestedTests {
@Nested
@NestedTestConfiguration(INHERIT)
class NestedTestCaseWithInheritedConfigTests {
class NestedWithInheritedConfigTests {
@Autowired(required = false)
@Qualifier("foo")
@@ -134,7 +134,6 @@ class TestExecutionListenersNestedTests {
}
}
}
}
// -------------------------------------------------------------------------
@@ -27,7 +27,6 @@ import org.springframework.test.context.NestedTestConfiguration;
import org.springframework.test.context.TestPropertySource;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.junit.jupiter.nested.TestPropertySourceTestClassScopedExtensionContextNestedTests.Config;
import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.context.NestedTestConfiguration.EnclosingConfiguration.INHERIT;
@@ -42,7 +41,7 @@ import static org.springframework.test.context.NestedTestConfiguration.Enclosing
* @author Sam Brannen
* @since 5.3
*/
@SpringJUnitConfig(Config.class)
@SpringJUnitConfig
@TestPropertySource(properties = "p1 = v1")
@NestedTestConfiguration(OVERRIDE) // since INHERIT is now the global default
class TestPropertySourceTestClassScopedExtensionContextNestedTests {
@@ -24,7 +24,6 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.test.context.NestedTestConfiguration;
import org.springframework.test.context.junit.jupiter.SpringExtension;
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
import org.springframework.test.context.junit.jupiter.nested.WebAppConfigurationNestedTests.Config;
import org.springframework.test.context.junit.jupiter.web.SpringJUnitWebConfig;
import org.springframework.test.context.web.WebAppConfiguration;
import org.springframework.web.context.WebApplicationContext;
@@ -44,7 +43,7 @@ import static org.springframework.test.context.NestedTestConfiguration.Enclosing
* @see ConstructorInjectionTestMethodScopedExtensionContextNestedTests
* @see org.springframework.test.context.junit4.nested.NestedTestsWithSpringRulesTests
*/
@SpringJUnitWebConfig(Config.class)
@SpringJUnitWebConfig
@NestedTestConfiguration(OVERRIDE) // since INHERIT is now the global default
class WebAppConfigurationNestedTests {