From ef17fc0027809d76123a64d8ab4d08429b26c88d Mon Sep 17 00:00:00 2001 From: Sam Brannen <104798+sbrannen@users.noreply.github.com> Date: Sun, 17 Mar 2024 15:19:50 +0100 Subject: [PATCH] Delete tests for legacy semantics for field and method searches I'm intentionally leaving this commit in the Git history, in case we later decide to re-introduce these tests. See #3553 --- ...rogrammaticExtensionRegistrationTests.java | 29 ------------ ...rogrammaticExtensionRegistrationTests.java | 45 ------------------- 2 files changed, 74 deletions(-) diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java index 856cae9dc88c..126f662d47ef 100644 --- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java +++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/OrderedProgrammaticExtensionRegistrationTests.java @@ -21,7 +21,6 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Order; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -168,20 +167,6 @@ void classLevelWithDefaultOrderDoesNotShadowExtensionFromSuperclass() { ); } - @Disabled("Disabled until legacy search mode is supported") - @Test - void classLevelWithDefaultOrderShadowingOrderFromSuperclassInLegacyMode() { - Class testClass = DefaultOrderShadowingDefaultOrderAndExplicitOrderClassLevelExtensionRegistrationTestCase.class; - String testClassName = testClass.getSimpleName(); - Class parent = DefaultOrderAndExplicitOrderClassLevelExtensionRegistrationTestCase.class; - String parentName = parent.getSimpleName(); - assertOutcome(testClass, // - parentName + " :: extension1 :: before test", // - parentName + " :: extension2 :: before test", // - testClassName + " :: extension3 :: before test" // - ); - } - @Test void classLevelWithExplicitOrderDoesNotShadowExtensionFromSuperclass() { Class testClass = ExplicitOrderShadowingDefaultOrderAndExplicitOrderClassLevelExtensionRegistrationTestCase.class; @@ -196,20 +181,6 @@ void classLevelWithExplicitOrderDoesNotShadowExtensionFromSuperclass() { ); } - @Disabled("Disabled until legacy search mode is supported") - @Test - void classLevelWithExplicitOrderShadowingOrderFromSuperclassInLegacyMode() { - Class testClass = ExplicitOrderShadowingDefaultOrderAndExplicitOrderClassLevelExtensionRegistrationTestCase.class; - String testClassName = testClass.getSimpleName(); - Class parent = DefaultOrderAndExplicitOrderClassLevelExtensionRegistrationTestCase.class; - String parentName = parent.getSimpleName(); - assertOutcome(testClass, // - parentName + " :: extension3 :: before test", // - testClassName + " :: extension2 :: before test", // - parentName + " :: extension1 :: before test" // - ); - } - @Test void classLevelWithDefaultOrderAndExplicitOrderFromInterface() { Class testClass = DefaultOrderAndExplicitOrderExtensionRegistrationFromInterfaceTestCase.class; diff --git a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java index e023db85f489..23e4cc9ec564 100644 --- a/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java +++ b/junit-jupiter-engine/src/test/java/org/junit/jupiter/engine/extension/ProgrammaticExtensionRegistrationTests.java @@ -32,7 +32,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Nested; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.TestInstance; @@ -120,28 +119,6 @@ void instanceLevelWithInheritedExtensions() { ); } - @Disabled("Disabled until legacy search mode is supported") - @Test - void instanceLevelWithInheritedAndHiddenExtensionsInLegacyMode() { - Class testClass = InstanceLevelExtensionRegistrationParentTestCase.class; - String parent = testClass.getSimpleName(); - assertOneTestSucceeded(testClass); - assertThat(callSequence).containsExactly( // - parent + " :: extension1 :: before test", // - parent + " :: extension2 :: before test" // - ); - - callSequence.clear(); - testClass = InstanceLevelExtensionRegistrationChildTestCase.class; - String child = testClass.getSimpleName(); - assertOneTestSucceeded(testClass); - assertThat(callSequence).containsExactly( // - parent + " :: extension1 :: before test", // - child + " :: extension2 :: before test", // - child + " :: extension3 :: before test" // - ); - } - @Test void classLevelWithInheritedExtensions() { Class testClass = ClassLevelExtensionRegistrationParentTestCase.class; @@ -164,28 +141,6 @@ void classLevelWithInheritedExtensions() { ); } - @Disabled("Disabled until legacy search mode is supported") - @Test - void classLevelWithInheritedAndHiddenExtensionsInLegacyMode() { - Class testClass = ClassLevelExtensionRegistrationParentTestCase.class; - String parent = testClass.getSimpleName(); - assertOneTestSucceeded(testClass); - assertThat(callSequence).containsExactly( // - parent + " :: extension1 :: before test", // - parent + " :: extension2 :: before test" // - ); - - callSequence.clear(); - testClass = ClassLevelExtensionRegistrationChildTestCase.class; - String child = testClass.getSimpleName(); - assertOneTestSucceeded(testClass); - assertThat(callSequence).containsExactly( // - parent + " :: extension1 :: before test", // - child + " :: extension2 :: before test", // - child + " :: extension3 :: before test" // - ); - } - /** * @since 5.5 */