Skip to content

Commit

Permalink
Delete tests for legacy semantics for field and method searches
Browse files Browse the repository at this point in the history
I'm intentionally leaving this commit in the Git history, in case we
later decide to re-introduce these tests.

See junit-team#3553
  • Loading branch information
sbrannen committed Apr 6, 2024
1 parent c8966e6 commit 32793d8
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 74 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand All @@ -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
*/
Expand Down

0 comments on commit 32793d8

Please sign in to comment.