Class TestFactoryTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
-
- org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor
-
- org.junit.jupiter.engine.descriptor.TestFactoryTestDescriptor
-
- All Implemented Interfaces:
Filterable
,Node<JupiterEngineExecutionContext>
,TestDescriptor
@API(status=INTERNAL, since="5.0") public class TestFactoryTestDescriptor extends TestMethodTestDescriptor implements Filterable
TestDescriptor
for@TestFactory
methods.- Since:
- 5.0
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.support.hierarchical.Node
Node.DynamicTestExecutor, Node.SkipResult
-
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
TestDescriptor.Type, TestDescriptor.Visitor
-
-
Field Summary
Fields Modifier and Type Field Description static String
DYNAMIC_CONTAINER_SEGMENT_TYPE
static String
DYNAMIC_TEST_SEGMENT_TYPE
-
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children
-
-
Constructor Summary
Constructors Constructor Description TestFactoryTestDescriptor(UniqueId uniqueId, Class<?> testClass, Method testMethod)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DynamicDescendantFilter
getDynamicDescendantFilter()
String
getLegacyReportingName()
Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.Set<TestTag>
getTags()
Get the set of tags associated with this descriptor.Class<?>
getTestClass()
Method
getTestMethod()
TestDescriptor.Type
getType()
Determine theTestDescriptor.Type
of this descriptor.protected void
invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
boolean
mayRegisterTests()
Determine if this descriptor may register dynamic tests during execution.-
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
-
Methods inherited from class org.junit.jupiter.engine.descriptor.JupiterTestDescriptor
cleanUp, determineDisplayName, executeAndMaskThrowable, getTags, shouldBeSkipped
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getDescendants, isContainer, isRoot, isTest, prune
-
Methods inherited from class org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor
execute, populateNewExtensionRegistry, prepare
-
-
-
-
Field Detail
-
DYNAMIC_CONTAINER_SEGMENT_TYPE
public static final String DYNAMIC_CONTAINER_SEGMENT_TYPE
- See Also:
- Constant Field Values
-
DYNAMIC_TEST_SEGMENT_TYPE
public static final String DYNAMIC_TEST_SEGMENT_TYPE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDynamicDescendantFilter
public DynamicDescendantFilter getDynamicDescendantFilter()
- Specified by:
getDynamicDescendantFilter
in interfaceFilterable
-
getType
public TestDescriptor.Type getType()
Description copied from interface:TestDescriptor
Determine theTestDescriptor.Type
of this descriptor.- Specified by:
getType
in interfaceTestDescriptor
- Overrides:
getType
in classTestMethodTestDescriptor
- Returns:
- the descriptor type; never
null
. - See Also:
TestDescriptor.isContainer()
,TestDescriptor.isTest()
-
mayRegisterTests
public boolean mayRegisterTests()
Description copied from interface:TestDescriptor
Determine if this descriptor may register dynamic tests during execution.The default implementation assumes tests are usually known during discovery and thus returns
false
.- Specified by:
mayRegisterTests
in interfaceTestDescriptor
-
invokeTestMethod
protected void invokeTestMethod(JupiterEngineExecutionContext context, Node.DynamicTestExecutor dynamicTestExecutor)
- Overrides:
invokeTestMethod
in classTestMethodTestDescriptor
-
getTags
public final Set<TestTag> getTags()
Description copied from interface:TestDescriptor
Get the set of tags associated with this descriptor.- Specified by:
getTags
in interfaceTestDescriptor
- Overrides:
getTags
in classAbstractTestDescriptor
- Returns:
- the set of tags associated with this descriptor; never
null
but potentially empty - See Also:
TestTag
-
getTestClass
public final Class<?> getTestClass()
-
getTestMethod
public final Method getTestMethod()
-
getLegacyReportingName
public String getLegacyReportingName()
Description copied from interface:TestDescriptor
Get the name of this descriptor in a format that is suitable for legacy reporting infrastructure — for example, for reporting systems built on the Ant-based XML reporting format for JUnit 4.The default implementation simply delegates to
TestDescriptor.getDisplayName()
.- Returns:
- the legacy reporting name; never
null
or blank
-
-