@API(status=INTERNAL,
since="5.0")
public class TestFactoryTestDescriptor
extends TestMethodTestDescriptor
implements Filterable
TestDescriptor for
@TestFactory methods.JupiterTestDescriptor.ExceptionHandlerInvoker<E extends Extension>Node.DynamicTestExecutor, Node.ExecutionMode, Node.Invocation<C extends EngineExecutionContext>, 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 DynamicDescendantFilter |
dynamicDescendantFilter |
private static ExecutableInvoker |
executableInvoker |
private static ExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Method,java.lang.Object> |
interceptorCall |
static java.lang.String |
SEGMENT_TYPE |
configurationchildren| Constructor and Description |
|---|
TestFactoryTestDescriptor(UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod,
JupiterConfiguration configuration) |
execute, populateNewExtensionRegistry, preparegetExclusiveResources, getExplicitExecutionMode, getLegacyReportingName, getTags, getTestClass, getTestMethodcleanUp, getDefaultChildExecutionMode, getExclusiveResourcesFromAnnotation, getExecutionMode, getExecutionModeFromAnnotation, getTags, invokeExecutionExceptionHandlers, shouldBeSkipped, toExecutionModeaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitafter, around, beforeaccept, containsTests, getDescendants, isContainer, isRoot, isTest, prunepublic static final java.lang.String SEGMENT_TYPE
public static final java.lang.String DYNAMIC_CONTAINER_SEGMENT_TYPE
public static final java.lang.String DYNAMIC_TEST_SEGMENT_TYPE
private static final ExecutableInvoker.ReflectiveInterceptorCall<java.lang.reflect.Method,java.lang.Object> interceptorCall
private static final ExecutableInvoker executableInvoker
private final DynamicDescendantFilter dynamicDescendantFilter
public TestFactoryTestDescriptor(UniqueId uniqueId, java.lang.Class<?> testClass, java.lang.reflect.Method testMethod, JupiterConfiguration configuration)
public DynamicDescendantFilter getDynamicDescendantFilter()
getDynamicDescendantFilter in interface Filterablepublic 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.
mayRegisterTests in interface TestDescriptorprotected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
invokeTestMethod in class TestMethodTestDescriptorprivate java.util.stream.Stream<DynamicNode> toDynamicNodeStream(java.lang.Object testFactoryMethodResult)
private JUnitException invalidReturnTypeException(java.lang.Throwable cause)
static java.util.Optional<JupiterTestDescriptor> createDynamicDescriptor(JupiterTestDescriptor parent, DynamicNode node, int index, TestSource defaultTestSource, DynamicDescendantFilter dynamicDescendantFilter, JupiterConfiguration configuration)
static TestSource fromUri(java.net.URI uri)
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 TestMethodTestDescriptorcontext - 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 TestMethodTestDescriptorcontext - the execution contextdescriptor - the test descriptor that was executedresult - the result of the execution