Top Description Fields Constructors Methods
org.junit.jupiter.engine.descriptor

public Class TestFactoryTestDescriptor

extends TestMethodTestDescriptor
implements Filterable
Class Inheritance
All Implemented Interfaces
org.junit.jupiter.engine.descriptor.Filterable
Annotations
@API
status:INTERNAL
since:5.0
Static Imports
org.apiguardian.api.API.Status.INTERNAL, org.junit.jupiter.engine.descriptor.MethodSourceSupport.METHOD_SCHEME, org.junit.platform.engine.support.descriptor.ClassSource.CLASS_SCHEME, .ClasspathResourceSource.CLASSPATH_SCHEME

TestDescriptor for @TestFactory methods.
Since
5.0

Field Summary

Modifier and TypeField and Description
public static final String
public static final String
private final DynamicDescendantFilter
private static final InterceptingExecutableInvoker
private static final InterceptingExecutableInvoker.ReflectiveInterceptorCall<Method, @Nullable Object>
public static final String

Constructor Summary

AccessConstructor and Description
public
TestFactoryTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)

private
TestFactoryTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method testMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)

Method Summary

Modifier and TypeMethod and Description
pack-priv static Optional<JupiterTestDescriptor>
createDynamicDescriptor(JupiterTestDescriptor parent, DynamicNode node, int index, TestSource defaultTestSource, DynamicDescendantFilter dynamicDescendantFilter, JupiterConfiguration configuration)

pack-priv static TestSource
fromUri(URI uri)

public DynamicDescendantFilter
public TestDescriptor.Type
private JUnitException
protected void
public boolean
mayRegisterTests()

Overrides default org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Determine if this descriptor may register dynamic tests during execution.

public void
public void
private Stream<DynamicNode>
toDynamicNodeStream(@Nullable Object testFactoryMethodResult)

protected TestFactoryTestDescriptor
withUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer)

Overrides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.withUniqueId.

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Inherited from org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor:
cleanUpexecutepopulateNewExtensionRegistryprepareprepareExtensionContext

Field Detail

DYNAMIC_CONTAINER_SEGMENT_TYPEback to summary
public static final String DYNAMIC_CONTAINER_SEGMENT_TYPE
DYNAMIC_TEST_SEGMENT_TYPEback to summary
public static final String DYNAMIC_TEST_SEGMENT_TYPE
dynamicDescendantFilterback to summary
private final DynamicDescendantFilter dynamicDescendantFilter
executableInvokerback to summary
private static final InterceptingExecutableInvoker executableInvoker

Hides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.executableInvoker.

interceptorCallback to summary
private static final InterceptingExecutableInvoker.ReflectiveInterceptorCall<Method, @Nullable Object> interceptorCall

Hides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.interceptorCall.

SEGMENT_TYPEback to summary
public static final String SEGMENT_TYPE

Hides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.SEGMENT_TYPE.

Constructor Detail

TestFactoryTestDescriptorback to summary
public TestFactoryTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod, Supplier<List<Class<?>>> enclosingInstanceTypes, JupiterConfiguration configuration)
TestFactoryTestDescriptorback to summary
private TestFactoryTestDescriptor(UniqueId uniqueId, String displayName, Class<?> testClass, Method testMethod, JupiterConfiguration configuration, DynamicDescendantFilter dynamicDescendantFilter)

Method Detail

createDynamicDescriptorback to summary
pack-priv static Optional<JupiterTestDescriptor> createDynamicDescriptor(JupiterTestDescriptor parent, DynamicNode node, int index, TestSource defaultTestSource, DynamicDescendantFilter dynamicDescendantFilter, JupiterConfiguration configuration)
fromUriback to summary
pack-priv static TestSource fromUri(URI uri)
Since
5.3
getDynamicDescendantFilterback to summary
public DynamicDescendantFilter getDynamicDescendantFilter()

Implements org.junit.jupiter.engine.descriptor.Filterable.getDynamicDescendantFilter.

Annotations
@Override
getTypeback to summary
public TestDescriptor.Type getType()

Overrides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.getType.

Implements org.junit.platform.engine.TestDescriptor.getType.

Doc from org.junit.platform.engine.TestDescriptor.getType.

Determine the Type of this descriptor.

Annotations
@Override
invalidReturnTypeExceptionback to summary
private JUnitException invalidReturnTypeException(Throwable cause)
invokeTestMethodback to summary
protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)

Overrides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeTestMethod.

Annotations
@Override
mayRegisterTestsback to summary
public boolean mayRegisterTests()

Overrides default org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Doc from org.junit.platform.engine.TestDescriptor.mayRegisterTests.

Determine if this descriptor may register dynamic tests during execution.

The default implementation assumes tests are usually known during discovery and thus returns false.

Annotations
@Override
nodeFinishedback to summary
public void nodeFinished(JupiterEngineExecutionContext context, TestDescriptor descriptor, TestExecutionResult result)

Overrides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.nodeFinished.

Overrides default org.junit.platform.engine.support.hierarchical.Node.nodeFinished.

Override TestMethodTestDescriptor#nodeFinished as a no-op, since the TestWatcher API is not supported for @TestFactory containers.

Annotations
@Override
Since
5.4
nodeSkippedback to summary
public void nodeSkipped(JupiterEngineExecutionContext context, TestDescriptor descriptor, Node.SkipResult result)

Overrides org.junit.jupiter.engine.descriptor.MethodBasedTestDescriptor.nodeSkipped.

Overrides default org.junit.platform.engine.support.hierarchical.Node.nodeSkipped.

Override TestMethodTestDescriptor#nodeSkipped as a no-op, since the TestWatcher API is not supported for @TestFactory containers.

Annotations
@Override
Since
5.4
toDynamicNodeStreamback to summary
private Stream<DynamicNode> toDynamicNodeStream(@Nullable Object testFactoryMethodResult)
Annotations
@SuppressWarnings:unchecked
withUniqueIdback to summary
protected TestFactoryTestDescriptor withUniqueId(UnaryOperator<UniqueId> uniqueIdTransformer)

Overrides org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.withUniqueId.

Doc from org.junit.jupiter.engine.descriptor.JupiterTestDescriptor.withUniqueId.

Returns shallow copy (without children) of this descriptor with the supplied unique ID.

Annotations
@Override