@API(value=Internal) public class MethodTestDescriptor 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 |
|---|
MethodTestDescriptor(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) |
protected static java.lang.String |
generateDefaultDisplayName(java.lang.reflect.Method testMethod) |
java.util.Set<org.junit.platform.engine.TestTag> |
getTags() |
java.lang.Class<?> |
getTestClass() |
java.lang.reflect.Method |
getTestMethod() |
protected void |
invokeTestMethod(JupiterEngineExecutionContext context) |
boolean |
isContainer() |
boolean |
isTest() |
JupiterEngineExecutionContext |
prepare(JupiterEngineExecutionContext context) |
org.junit.platform.engine.support.hierarchical.Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context) |
determineDisplayName, executeAndMaskThrowable, getTags, isLeaf, populateNewExtensionRegistryFromExtendWithaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, setSource, toStringpublic MethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId,
java.lang.Class<?> testClass,
java.lang.reflect.Method testMethod)
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 boolean isTest()
public boolean isContainer()
protected static java.lang.String generateDefaultDisplayName(java.lang.reflect.Method testMethod)
public JupiterEngineExecutionContext prepare(JupiterEngineExecutionContext context) throws java.lang.Exception
java.lang.Exceptionpublic org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws java.lang.Exception
java.lang.Exceptionpublic JupiterEngineExecutionContext execute(JupiterEngineExecutionContext context) throws java.lang.Exception
java.lang.Exceptionprotected void invokeTestMethod(JupiterEngineExecutionContext context)