@API(status=INTERNAL,
since="5.0")
public class TestMethodTestDescriptor
extends JupiterTestDescriptor
TestDescriptor for tests based on Java methods.
The default display name for a test method is the name of the method
concatenated with a comma-separated list of parameter types in parentheses.
The names of parameter types are retrieved using Class.getSimpleName().
For example, the default display name for the following test method is
testUser(TestInfo, User).
@Test
void testUser(TestInfo testInfo, @Mock User user) { ... }
| Constructor and Description |
|---|
TestMethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod) |
| Modifier and Type | Method and Description |
|---|---|
JupiterEngineExecutionContext |
execute(JupiterEngineExecutionContext context,
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) |
java.lang.String |
getLegacyReportingName() |
java.util.Set<org.junit.platform.engine.TestTag> |
getTags() |
java.lang.Class<?> |
getTestClass() |
java.lang.reflect.Method |
getTestMethod() |
org.junit.platform.engine.TestDescriptor.Type |
getType() |
protected void |
invokeTestMethod(JupiterEngineExecutionContext context,
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) |
protected ExtensionRegistry |
populateNewExtensionRegistry(JupiterEngineExecutionContext context) |
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context) |
determineDisplayName, executeAndMaskThrowable, getTags, populateNewExtensionRegistryFromExtendWith, shouldBeSkippedaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringpublic TestMethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod)
public org.junit.platform.engine.TestDescriptor.Type getType()
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws java.lang.Exception
java.lang.Exceptionprotected ExtensionRegistry populateNewExtensionRegistry(JupiterEngineExecutionContext context)
public JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) throws java.lang.Exception
java.lang.Exceptionprotected void invokeTestMethod(JupiterEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor)
public final java.util.Set<org.junit.platform.engine.TestTag> getTags()
getTags in interface org.junit.platform.engine.TestDescriptorgetTags in class org.junit.platform.engine.support.descriptor.AbstractTestDescriptorpublic final java.lang.Class<?> getTestClass()
public final java.lang.reflect.Method getTestMethod()
public java.lang.String getLegacyReportingName()