@API(status=INTERNAL,
since="5.0")
public abstract class JupiterTestDescriptor
extends AbstractTestDescriptor
implements Node<JupiterEngineExecutionContext>
Node.DynamicTestExecutor, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitorchildren| Modifier and Type | Method and Description |
|---|---|
void |
cleanUp(JupiterEngineExecutionContext context)
Cleanup the supplied
context after execution. |
protected static <E extends AnnotatedElement> |
determineDisplayName(E element,
Function<E,String> defaultDisplayNameGenerator) |
protected void |
executeAndMaskThrowable(Executable executable)
Execute the supplied
Executable and
mask any
exception thrown as an unchecked exception. |
protected static Set<TestTag> |
getTags(AnnotatedElement element) |
abstract JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context)
Must be overridden and return a new context so cleanUp() does not accidentally close the parent context.
|
Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context)
Determine if the execution of the supplied
context should be
skipped. |
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, before, executeaccept, containsTests, getDescendants, getLegacyReportingName, getType, isContainer, isRoot, isTest, mayRegisterTests, pruneprotected static Set<TestTag> getTags(AnnotatedElement element)
protected static <E extends AnnotatedElement> String determineDisplayName(E element, Function<E,String> defaultDisplayNameGenerator)
public Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws Exception
Nodecontext should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip().
shouldBeSkipped in interface Node<JupiterEngineExecutionContext>Exceptionpublic abstract JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws Exception
prepare in interface Node<JupiterEngineExecutionContext>ExceptionNode.cleanUp(EngineExecutionContext)public void cleanUp(JupiterEngineExecutionContext context) throws Exception
Nodecontext after execution.
The default implementation does nothing.
cleanUp in interface Node<JupiterEngineExecutionContext>ExceptionNode.prepare(EngineExecutionContext)protected void executeAndMaskThrowable(Executable executable)
Executable and
mask any
exception thrown as an unchecked exception.executable - the Executable to executeExceptionUtils.throwAsUncheckedException(Throwable)Copyright © 2020. All rights reserved.