@API(status=INTERNAL,
since="5.0")
public class TestFactoryTestDescriptor
extends TestMethodTestDescriptor
TestDescriptor for
@TestFactory methods.Node.DynamicTestExecutor, Node.SkipResultTestDescriptor.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, preparegetLegacyReportingName, getTags, getTestClass, getTestMethoddetermineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, shouldBeSkippedaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitaccept, containsTests, getDescendants, isContainer, isRoot, isTest, prunepublic 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()
TestDescriptorTestDescriptor.Type of this descriptor.getType in interface TestDescriptorgetType in class TestMethodTestDescriptornull.TestDescriptor.isContainer(),
TestDescriptor.isTest()public boolean mayRegisterTests()
TestDescriptorThe default implementation assumes tests are usually known during
discovery and thus returns false.
protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
invokeTestMethod in class TestMethodTestDescriptorprivate 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)