@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,
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) |
org.junit.platform.engine.support.hierarchical.Node.SkipResult |
shouldBeSkipped(JupiterEngineExecutionContext context) |
determineDisplayName, executeAndMaskThrowable, getTags, isLeaf, populateNewExtensionRegistryFromExtendWith, shouldContainerBeSkipped, shouldTestBeSkippedaddChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, setSource, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic MethodTestDescriptor(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 org.junit.platform.engine.support.hierarchical.Node.SkipResult shouldBeSkipped(JupiterEngineExecutionContext context) throws java.lang.Exception
java.lang.Exceptionpublic 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()