Module org.junit.jupiter.engine
Class DynamicContainerTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
-
- org.junit.jupiter.engine.descriptor.DynamicNodeTestDescriptor
-
- org.junit.jupiter.engine.descriptor.DynamicContainerTestDescriptor
-
- All Implemented Interfaces:
Node<JupiterEngineExecutionContext>
,TestDescriptor
class DynamicContainerTestDescriptor extends DynamicNodeTestDescriptor
TestDescriptor
for aDynamicContainer
.- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
JupiterTestDescriptor.ExceptionHandlerInvoker<E extends Extension>
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResult
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
-
Field Summary
Fields Modifier and Type Field Description private DynamicContainer
dynamicContainer
private DynamicDescendantFilter
dynamicDescendantFilter
private TestSource
testSource
-
Fields inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
configuration
-
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
-
Constructor Summary
Constructors Constructor Description DynamicContainerTestDescriptor(UniqueId uniqueId, int index, DynamicContainer dynamicContainer, TestSource testSource, DynamicDescendantFilter dynamicDescendantFilter, JupiterConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description JupiterEngineExecutionContext
execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
Execute the behavior of this node.TestDescriptor.Type
getType()
Determine theTestDescriptor.Type
of this descriptor.private java.util.Optional<JupiterTestDescriptor>
toDynamicDescriptor(int index, DynamicNode childNode)
-
Methods inherited from class org.junit.jupiter.engine.descriptor.DynamicNodeTestDescriptor
getLegacyReportingName, prepare, shouldBeSkipped
-
Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
cleanUp, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getExplicitExecutionMode, getTags, invokeExecutionExceptionHandlers, toExecutionMode
-
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.support.hierarchical.Node
after, around, before, getExclusiveResources, nodeFinished, nodeSkipped
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getAncestors, getDescendants, isContainer, isRoot, isTest, mayRegisterTests, prune
-
-
-
-
Field Detail
-
dynamicContainer
private final DynamicContainer dynamicContainer
-
testSource
private final TestSource testSource
-
dynamicDescendantFilter
private final DynamicDescendantFilter dynamicDescendantFilter
-
-
Constructor Detail
-
DynamicContainerTestDescriptor
DynamicContainerTestDescriptor(UniqueId uniqueId, int index, DynamicContainer dynamicContainer, TestSource testSource, DynamicDescendantFilter dynamicDescendantFilter, JupiterConfiguration configuration)
-
-
Method Detail
-
getType
public TestDescriptor.Type getType()
Description copied from interface:TestDescriptor
Determine theTestDescriptor.Type
of this descriptor.- Returns:
- the descriptor type; never
null
. - See Also:
TestDescriptor.isContainer()
,TestDescriptor.isTest()
-
execute
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.Exception
Description copied from interface:Node
Execute the behavior of this node.Containers typically do not implement this method since the
HierarchicalTestEngine
handles execution of their children.The supplied
dynamicTestExecutor
may be used to submit additional dynamic tests for immediate execution.The default implementation returns the supplied
context
unmodified.- Parameters:
context
- the context to execute indynamicTestExecutor
- the executor to submit dynamic tests to- Returns:
- the new context to be used for children of this node and for the after behavior of the parent of this node, if any
- Throws:
java.lang.Exception
- See Also:
Node.before(C)
,Node.after(C)
-
toDynamicDescriptor
private java.util.Optional<JupiterTestDescriptor> toDynamicDescriptor(int index, DynamicNode childNode)
-
-