Class AbstractOrderingVisitor
java.lang.Object
org.junit.jupiter.engine.discovery.AbstractOrderingVisitor
- All Implemented Interfaces:
org.junit.platform.engine.TestDescriptor.Visitor
- Direct Known Subclasses:
ClassOrderingVisitor, MethodOrderingVisitor
abstract class AbstractOrderingVisitor
extends Object
implements org.junit.platform.engine.TestDescriptor.Visitor
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
FieldsModifier and TypeFieldDescriptionprivate final org.junit.platform.engine.support.discovery.DiscoveryIssueReporter -
Constructor Summary
ConstructorsConstructorDescriptionAbstractOrderingVisitor(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter) -
Method Summary
Modifier and TypeMethodDescriptionprotected <PARENT extends org.junit.platform.engine.TestDescriptor>
voiddoWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, org.junit.platform.engine.TestDescriptor testDescriptor, Consumer<PARENT> action, Function<PARENT, String> errorMessageBuilder) protected <CHILD extends org.junit.platform.engine.TestDescriptor, WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>>
voidorderChildrenTestDescriptors(org.junit.platform.engine.TestDescriptor parentTestDescriptor, Class<CHILD> matchingChildrenType, Optional<Consumer<CHILD>> validationAction, Function<CHILD, WRAPPER> descriptorWrapperFactory, AbstractOrderingVisitor.DescriptorWrapperOrderer<?, WRAPPER> descriptorWrapperOrderer) private voidreportWarning(org.junit.platform.engine.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 org.junit.platform.engine.TestDescriptor.Visitor
visit
-
Field Details
-
issueReporter
private final org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter
-
-
Constructor Details
-
AbstractOrderingVisitor
AbstractOrderingVisitor(org.junit.platform.engine.support.discovery.DiscoveryIssueReporter issueReporter)
-
-
Method Details
-
doWithMatchingDescriptor
protected <PARENT extends org.junit.platform.engine.TestDescriptor> void doWithMatchingDescriptor(Class<PARENT> parentTestDescriptorType, org.junit.platform.engine.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 org.junit.platform.engine.TestDescriptor, WRAPPER extends AbstractAnnotatedDescriptorWrapper<?>> void orderChildrenTestDescriptors(org.junit.platform.engine.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
private void reportWarning(org.junit.platform.engine.TestDescriptor parentTestDescriptor, String message) -
shouldNonMatchingDescriptorsComeBeforeOrderedOnes
protected abstract boolean shouldNonMatchingDescriptorsComeBeforeOrderedOnes()
-