@API(status=INTERNAL, since="5.0") public class TestFactoryTestDescriptor extends TestMethodTestDescriptor
TestDescriptor
for
@TestFactory
methods.Node.DynamicTestExecutor, Node.SkipResult
TestDescriptor.Type, TestDescriptor.Visitor
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DYNAMIC_CONTAINER_SEGMENT_TYPE |
static java.lang.String |
DYNAMIC_TEST_SEGMENT_TYPE |
private static ExecutableInvoker |
executableInvoker |
children
Constructor and Description |
---|
TestFactoryTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod) |
Modifier and Type | Method and Description |
---|---|
(package private) static JupiterTestDescriptor |
createDynamicDescriptor(JupiterTestDescriptor parent,
DynamicNode node,
int index,
TestSource source) |
TestDescriptor.Type |
getType()
Determine the
TestDescriptor.Type of this descriptor. |
private JUnitException |
invalidReturnTypeException(java.lang.Throwable cause) |
protected void |
invokeTestMethod(JupiterEngineExecutionContext context,
Node.DynamicTestExecutor dynamicTestExecutor) |
boolean |
mayRegisterTests()
Determine if this descriptor may register dynamic tests during execution.
|
private java.util.stream.Stream<DynamicNode> |
toDynamicNodeStream(java.lang.Object testFactoryMethodResult) |
execute, populateNewExtensionRegistry, prepare
getLegacyReportingName, getTags, getTestClass, getTestMethod
determineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, shouldBeSkipped
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
accept, containsTests, getDescendants, isContainer, isRoot, isTest, prune
public static final java.lang.String DYNAMIC_CONTAINER_SEGMENT_TYPE
public static final java.lang.String DYNAMIC_TEST_SEGMENT_TYPE
private static final ExecutableInvoker executableInvoker
public TestFactoryTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod)
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
.
protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
invokeTestMethod
in class TestMethodTestDescriptor
private java.util.stream.Stream<DynamicNode> toDynamicNodeStream(java.lang.Object testFactoryMethodResult)
static JupiterTestDescriptor createDynamicDescriptor(JupiterTestDescriptor parent, DynamicNode node, int index, TestSource source)
private JUnitException invalidReturnTypeException(java.lang.Throwable cause)