@API(status=INTERNAL, since="5.0") public class TestFactoryTestDescriptor extends TestMethodTestDescriptor implements Filterable
TestDescriptor
for
@TestFactory
methods.Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, Node.SkipResult
TestDescriptor.Type, TestDescriptor.Visitor
Modifier and Type | Field and Description |
---|---|
static String |
DYNAMIC_CONTAINER_SEGMENT_TYPE |
static String |
DYNAMIC_TEST_SEGMENT_TYPE |
configuration
children
Constructor and Description |
---|
TestFactoryTestDescriptor(UniqueId uniqueId,
Class<?> testClass,
Method testMethod,
JupiterConfiguration configuration) |
execute, populateNewExtensionRegistry, prepare
getExclusiveResources, getExplicitExecutionMode, getLegacyReportingName, getTags, getTestClass, getTestMethod
cleanUp, executeAndMaskThrowable, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, shouldBeSkipped, toExecutionMode
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
after, around, before
accept, containsTests, getDescendants, isContainer, isRoot, isTest, prune
public static final String DYNAMIC_CONTAINER_SEGMENT_TYPE
public static final String DYNAMIC_TEST_SEGMENT_TYPE
public TestFactoryTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, JupiterConfiguration configuration)
public DynamicDescendantFilter getDynamicDescendantFilter()
getDynamicDescendantFilter
in interface Filterable
public TestDescriptor.Type getType()
TestDescriptor
TestDescriptor.Type
of this descriptor.getType
in interface TestDescriptor
getType
in class TestMethodTestDescriptor
null
.TestDescriptor.isContainer()
,
TestDescriptor.isTest()
public boolean mayRegisterTests()
TestDescriptor
The default implementation assumes tests are usually known during
discovery and thus returns false
.
mayRegisterTests
in interface TestDescriptor
protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
invokeTestMethod
in class TestMethodTestDescriptor
public void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result)
TestMethodTestDescriptor.nodeSkipped(org.junit.jupiter.engine.execution.JupiterEngineExecutionContext, org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.support.hierarchical.Node.SkipResult)
as a no-op, since
the TestWatcher
API is not supported for @TestFactory
containers.nodeSkipped
in interface Node<JupiterEngineExecutionContext>
nodeSkipped
in class TestMethodTestDescriptor
context
- the execution contextdescriptor
- the test descriptor that was skippedresult
- the result of skipped executionpublic void nodeFinished(JupiterEngineExecutionContext context, TestDescriptor descriptor, TestExecutionResult result)
TestMethodTestDescriptor.nodeFinished(org.junit.jupiter.engine.execution.JupiterEngineExecutionContext, org.junit.platform.engine.TestDescriptor, org.junit.platform.engine.TestExecutionResult)
as a no-op, since
the TestWatcher
API is not supported for @TestFactory
containers.nodeFinished
in interface Node<JupiterEngineExecutionContext>
nodeFinished
in class TestMethodTestDescriptor
context
- the execution contextdescriptor
- the test descriptor that was executedresult
- the result of the executionCopyright © 2023. All rights reserved.