Class AbstractOrderingVisitor
java.lang.Object
org.junit.jupiter.engine.discovery.AbstractOrderingVisitor
- All Implemented Interfaces:
TestDescriptor.Visitor
- Direct Known Subclasses:
ClassOrderingVisitor, MethodOrderingVisitor
Abstract base class for visitors that
order children nodes.
- Since:
- 5.8
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classprotected static interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected <PARENT extends TestDescriptor>
voiddoWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, Consumer<PARENT> action, Function<PARENT, String> errorMessageBuilder) protected <CHILD extends TestDescriptor, WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>>
voidorderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, Class<CHILD> matchingChildrenType, Optional<Consumer<CHILD>> validationAction, Function<CHILD, WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor.DescriptorWrapperOrderer<?, WRAPPER> descriptorWrapperOrderer) private voidreportWarning(TestDescriptor parentTestDescriptor, String message) protected abstract booleanMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface TestDescriptor.Visitor
visit
-
Field Details
-
issueReporter
-
-
Constructor Details
-
AbstractOrderingVisitor
AbstractOrderingVisitor(DiscoveryIssueReporter issueReporter)
-
-
Method Details
-
doWithMatchingDescriptor
protected <PARENT extends TestDescriptor> void doWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, TestDescriptor testDescriptor, Consumer<PARENT> action, Function<PARENT, String> errorMessageBuilder) - Type Parameters:
PARENT- the parent container type to search in for matching children
-
orderChildrenTestDescriptors
protected <CHILD extends TestDescriptor, WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>> void orderChildrenTestDescriptors(TestDescriptor parentTestDescriptor, Class<CHILD> matchingChildrenType, Optional<Consumer<CHILD>> validationAction, Function<CHILD, WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor.DescriptorWrapperOrderer<?, WRAPPER> descriptorWrapperOrderer) - Type Parameters:
CHILD- the type of children (containers or tests) to order
-
reportWarning
-
shouldNonMatchingDescriptorsComeBeforeOrderedOnes
protected abstract boolean shouldNonMatchingDescriptorsComeBeforeOrderedOnes()
-