@API(value=Internal) public class ClassTestDescriptor extends JupiterTestDescriptor
TestDescriptor
for tests based on Java classes.
The default display name for a top-level or nested static test class is the fully qualified name of the class with the package name and leading dot (".") removed.
Node.SkipResult
TestDescriptor.Visitor
Modifier | Constructor and Description |
---|---|
|
ClassTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass) |
protected |
ClassTestDescriptor(UniqueId uniqueId,
java.util.function.Function<java.lang.Class<?>,java.lang.String> defaultDisplayNameGenerator,
java.lang.Class<?> testClass) |
Modifier and Type | Method and Description |
---|---|
void |
after(JupiterEngineExecutionContext context)
Execute the after behavior of this node.
|
JupiterEngineExecutionContext |
before(JupiterEngineExecutionContext context)
Execute the before behavior of this node.
|
java.util.Set<TestTag> |
getTags()
Get the set of tags associated with this descriptor.
|
java.lang.Class<?> |
getTestClass() |
protected void |
invokeTestInstancePostProcessors(java.lang.Object instance,
ExtensionRegistry registry,
ExtensionContext context) |
boolean |
isContainer()
Determine if this descriptor describes a container.
|
boolean |
isTest()
Determine if this descriptor describes a test.
|
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context)
Prepare the supplied
context prior to execution. |
Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context)
Determine if the execution of the supplied
context should be
skipped. |
protected TestInstanceProvider |
testInstanceProvider(JupiterEngineExecutionContext parentExecutionContext,
ExtensionRegistry registry,
ExtensionContext extensionContext) |
determineDisplayName, executeAndMaskThrowable, getTags, isLeaf, populateNewExtensionRegistryFromExtendWith
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, setSource, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept, getAllDescendants, hasTests, isRoot
public ClassTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass)
protected ClassTestDescriptor(UniqueId uniqueId, java.util.function.Function<java.lang.Class<?>,java.lang.String> defaultDisplayNameGenerator, java.lang.Class<?> testClass)
public java.util.Set<TestTag> getTags()
TestDescriptor
getTags
in interface TestDescriptor
getTags
in class AbstractTestDescriptor
null
but potentially emptyTestTag
public final java.lang.Class<?> getTestClass()
public final boolean isTest()
TestDescriptor
public final boolean isContainer()
TestDescriptor
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context)
Node
context
prior to execution.
The default implementation returns the supplied context
unmodified.
public Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws java.lang.Exception
Node
context
should be
skipped.
The default implementation returns Node.SkipResult.doNotSkip()
.
java.lang.Exception
public JupiterEngineExecutionContext before(JupiterEngineExecutionContext context) throws java.lang.Exception
Node
This method will be called once before execution of this node.
context
- the context to execute injava.lang.Exception
Node.execute(C)
,
Node.after(C)
public void after(JupiterEngineExecutionContext context) throws java.lang.Exception
Node
This method will be called once after execution of this node.
context
- the context to execute injava.lang.Exception
Node.before(C)
,
Node.execute(C)
protected TestInstanceProvider testInstanceProvider(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionContext extensionContext)
protected void invokeTestInstancePostProcessors(java.lang.Object instance, ExtensionRegistry registry, ExtensionContext context)