Class DynamicTestTestDescriptor
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.DynamicTestTestDescriptor
- All Implemented Interfaces:
Node<JupiterEngineExecutionContext>, TestDescriptor
TestDescriptor for a DynamicTest.- Since:
- 5.0
-
Nested Class Summary
Nested classes/interfaces inherited from class JupiterTestDescriptor
JupiterTestDescriptor.ExceptionHandlerInvoker<E>Nested classes/interfaces inherited from interface Node
Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C>, Node.SkipResultNested classes/interfaces inherited from interface TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate org.junit.jupiter.api.DynamicTestprivate static final InvocationInterceptorChainFields inherited from class DynamicNodeTestDescriptor
indexFields inherited from class JupiterTestDescriptor
configurationFields inherited from class AbstractTestDescriptor
children -
Constructor Summary
ConstructorsConstructorDescriptionDynamicTestTestDescriptor(UniqueId uniqueId, int index, org.junit.jupiter.api.DynamicTest dynamicTest, TestSource source, JupiterConfiguration configuration) -
Method Summary
Modifier and TypeMethodDescriptionvoidafter(JupiterEngineExecutionContext context) Avoid anOutOfMemoryErrorby releasing the reference to this descriptor'sDynamicTestwhich holds a reference to the user-suppliedExecutablewhich may potentially consume large amounts of memory on the heap.execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) Execute the behavior of this node.getType()Determine theTestDescriptor.Typeof this descriptor.protected DynamicTestTestDescriptorwithUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer) Returns shallow copy (without children) of this descriptor with the supplied unique ID.Methods inherited from class DynamicNodeTestDescriptor
getLegacyReportingName, prepare, shouldBeSkippedMethods inherited from class JupiterTestDescriptor
cleanUp, copyIncludingDescendants, getDefaultChildExecutionMode, getExclusiveResources, getExecutionMode, getExecutionModeFromAnnotation, getExplicitExecutionMode, getTags, invokeExecutionExceptionHandlers, toExecutionModeMethods inherited from class AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, orderChildren, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from interface Node
around, before, nodeFinished, nodeSkippedMethods inherited from interface TestDescriptor
accept, getAncestors, getDescendants, isContainer, isRoot, isTest, mayRegisterTests, prune
-
Field Details
-
interceptorChain
-
dynamicTest
private org.junit.jupiter.api.DynamicTest dynamicTest
-
-
Constructor Details
-
DynamicTestTestDescriptor
DynamicTestTestDescriptor(UniqueId uniqueId, int index, org.junit.jupiter.api.DynamicTest dynamicTest, TestSource source, JupiterConfiguration configuration)
-
-
Method Details
-
withUniqueId
Description copied from class:JupiterTestDescriptorReturns shallow copy (without children) of this descriptor with the supplied unique ID.- Specified by:
withUniqueIdin classJupiterTestDescriptor- Returns:
- shallow copy (without children) of this descriptor with the supplied unique ID
-
getType
Description copied from interface:TestDescriptorDetermine theTestDescriptor.Typeof this descriptor.- Returns:
- the descriptor type; never
null. - See Also:
-
execute
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor) Description copied from interface:NodeExecute the behavior of this node.Containers typically do not implement this method since the
HierarchicalTestEnginehandles execution of their children.The supplied
dynamicTestExecutormay be used to submit additional dynamic tests for immediate execution.The default implementation returns the supplied
contextunmodified.- 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
- See Also:
-
after
Avoid anOutOfMemoryErrorby releasing the reference to this descriptor'sDynamicTestwhich holds a reference to the user-suppliedExecutablewhich may potentially consume large amounts of memory on the heap.- Parameters:
context- the context to execute in- Throws:
Exception- Since:
- 5.5
- See Also:
-