Node<JupiterEngineExecutionContext>, TestDescriptorNestedClassTestDescriptor@API(status=INTERNAL, since="5.0") 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.DynamicTestExecutor, Node.SkipResultTestDescriptor.Type, TestDescriptor.Visitorchildren| Modifier | Constructor | 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 | Description |
|---|---|---|
void |
after(JupiterEngineExecutionContext context) |
Execute the after behavior of this node.
|
JupiterEngineExecutionContext |
before(JupiterEngineExecutionContext context) |
Execute the before behavior of this node.
|
java.lang.String |
getLegacyReportingName() |
Get the name of this descriptor in a format that is suitable for legacy
reporting infrastructure — for example, for reporting systems built
on the Ant-based XML reporting format for JUnit 4.
|
java.util.Set<TestTag> |
getTags() |
Get the set of tags associated with this descriptor.
|
java.lang.Class<?> |
getTestClass() |
|
TestDescriptor.Type |
getType() |
Determine the
TestDescriptor.Type of this descriptor. |
protected java.lang.Object |
instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext,
ExtensionRegistry registry,
ExtensionContext extensionContext) |
|
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context) |
Must be overridden and return a new context so cleanUp() does not accidentally close the parent context.
|
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringcleanUp, determineDisplayName, executeAndMaskThrowable, getTags, shouldBeSkippedclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccept, containsTests, getDescendants, isContainer, isRoot, isTest, mayRegisterTests, prunepublic 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()
TestDescriptorgetTags in interface TestDescriptorgetTags in class AbstractTestDescriptornull
but potentially emptyTestTagpublic final java.lang.Class<?> getTestClass()
public TestDescriptor.Type getType()
TestDescriptorTestDescriptor.Type of this descriptor.null.TestDescriptor.isContainer(),
TestDescriptor.isTest()public java.lang.String getLegacyReportingName()
TestDescriptorThe default implementation simply delegates to TestDescriptor.getDisplayName().
null or blankpublic JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context)
JupiterTestDescriptorprepare in interface Node<JupiterEngineExecutionContext>prepare in class JupiterTestDescriptorNode.cleanUp(EngineExecutionContext)public JupiterEngineExecutionContext before(JupiterEngineExecutionContext context) throws java.lang.Exception
NodeThis method will be called once before execution of this node.
context - the context to execute injava.lang.ExceptionNode.execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor),
Node.after(C)public void after(JupiterEngineExecutionContext context) throws java.lang.Exception
NodeThis method will be called once after execution of this node.
context - the context to execute injava.lang.ExceptionNode.before(C),
Node.execute(C, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor)protected java.lang.Object instantiateTestClass(JupiterEngineExecutionContext parentExecutionContext, ExtensionRegistry registry, ExtensionContext extensionContext)