C
- the type of EngineExecutionContext
used by the
HierarchicalTestEngine
ClassTestDescriptor
, JupiterEngineDescriptor
, JupiterTestDescriptor
, NestedClassTestDescriptor
, TestFactoryTestDescriptor
, TestMethodTestDescriptor
, TestTemplateInvocationTestDescriptor
, TestTemplateTestDescriptor
@API(status=MAINTAINED, since="1.0") public interface Node<C extends EngineExecutionContext>
HierarchicalTestEngine
Modifier and Type | Interface | Description |
---|---|---|
static interface |
Node.DynamicTestExecutor |
Executor for additional, dynamic test descriptors discovered during
execution of a
Node . |
static class |
Node.SkipResult |
The result of determining whether the execution of a given
context
should be skipped. |
Modifier and Type | Method | Description |
---|---|---|
default void |
after(C context) |
Execute the after behavior of this node.
|
default C |
before(C context) |
Execute the before behavior of this node.
|
default C |
execute(C context,
Node.DynamicTestExecutor dynamicTestExecutor) |
Execute the behavior of this node.
|
default C |
prepare(C context) |
Prepare the supplied
context prior to execution. |
default Node.SkipResult |
shouldBeSkipped(C context) |
Determine if the execution of the supplied
context should be
skipped. |
default C prepare(C context) throws java.lang.Exception
context
prior to execution.
The default implementation returns the supplied context
unmodified.
java.lang.Exception
default Node.SkipResult shouldBeSkipped(C context) throws java.lang.Exception
context
should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip()
.
java.lang.Exception
default C before(C context) throws java.lang.Exception
This method will be called once before execution of this node.
context
- the context to execute injava.lang.Exception
execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor)
,
after(C)
default C execute(C context, Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.Exception
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.
default void after(C context) throws java.lang.Exception
This method will be called once after execution of this node.
context
- the context to execute injava.lang.Exception
before(C)
,
execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor)