C
- the type of EngineExecutionContext
used by the
HierarchicalTestEngine
@API(value=Experimental) public interface Node<C extends EngineExecutionContext>
HierarchicalTestEngine
Modifier and Type | Interface and 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 and 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 Exception
context
prior to execution.
The default implementation returns the supplied context
unmodified.
Exception
default Node.SkipResult shouldBeSkipped(C context) throws Exception
context
should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip()
.
Exception
default C before(C context) throws Exception
This method will be called once before execution of this node.
context
- the context to execute inException
execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor)
,
after(C)
default C execute(C context, Node.DynamicTestExecutor dynamicTestExecutor) throws 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 Exception
This method will be called once after execution of this node.
context
- the context to execute inException
before(C)
,
execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor)