Class MethodTestDescriptor
java.lang.Object
org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
org.antublue.test.engine.internal.descriptor.MethodTestDescriptor
- All Implemented Interfaces:
org.junit.platform.engine.TestDescriptor
public final class MethodTestDescriptor
extends org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
Class to implement an extended test method descriptor
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.junit.platform.engine.TestDescriptor
org.junit.platform.engine.TestDescriptor.Type, org.junit.platform.engine.TestDescriptor.Visitor -
Field Summary
Fields inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
children -
Constructor Summary
ConstructorsConstructorDescriptionMethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, String displayName, Class<?> testClass, Parameter testParameter, Method testMethod) Constructor -
Method Summary
Modifier and TypeMethodDescriptionvoidexecute(TestExecutionContext testExecutionContext) Method to test the test descriptorvoidflush()Method to flush System.out and System.err PrintStreams<T> List<T>getChildren(Class<T> clazz) Method to get a List of children cast as a specific ClassOptional<org.junit.platform.engine.TestSource>Method to get the TestSourceClass<?>Method to get the test classMethod to get the test methodMethod to get the test parameterprotected ThrowableCollectorMethod to get the test descriptors ThrowableCollectororg.junit.platform.engine.TestDescriptor.TypegetType()Method to get the test descriptor TypebooleanMethod to return whether the test descriptor is a containerbooleanisTest()Method to return whether the test descriptor is a testprotected ThrowablepruneStackTrace(Throwable throwable, String markerClassName) Method to prune a Throwable stacktracevoidskip(TestExecutionContext testExecutionContext) Method to skip the TestDescriptor's children, then the TestDescriptor (recursively)Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.junit.platform.engine.TestDescriptor
accept, getDescendants, getLegacyReportingName, isRoot, mayRegisterTests, prune
-
Constructor Details
-
MethodTestDescriptor
public MethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, String displayName, Class<?> testClass, Parameter testParameter, Method testMethod) Constructor- Parameters:
uniqueId- uniqueIddisplayName- displayNametestClass- testClasstestParameter- testParametertestMethod- testMethod
-
-
Method Details
-
getSource
Method to get the TestSource- Specified by:
getSourcein interfaceorg.junit.platform.engine.TestDescriptor- Overrides:
getSourcein classorg.junit.platform.engine.support.descriptor.AbstractTestDescriptor- Returns:
- the return value
-
getType
public org.junit.platform.engine.TestDescriptor.Type getType()Method to get the test descriptor Type- Returns:
- the return value
-
isTest
public boolean isTest()Method to return whether the test descriptor is a test- Returns:
- the return value
-
isContainer
public boolean isContainer()Method to return whether the test descriptor is a container- Returns:
- the return value
-
getTestClass
Method to get the test class- Returns:
- the return value
-
getTestParameter
Method to get the test parameter- Returns:
- the return value
-
getTestMethod
Method to get the test method- Returns:
- the return value
-
execute
Method to test the test descriptor- Parameters:
testExecutionContext- testExecutionContext
-
getChildren
Method to get a List of children cast as a specific Class- Type Parameters:
T- the return type- Parameters:
clazz- clazz- Returns:
- the return value
-
getThrowableCollector
Method to get the test descriptors ThrowableCollector- Returns:
- the return value
-
pruneStackTrace
Method to prune a Throwable stacktrace- Parameters:
throwable- throwablemarkerClassName- markerClassName- Returns:
- the return value
-
flush
public void flush()Method to flush System.out and System.err PrintStreams -
skip
Method to skip the TestDescriptor's children, then the TestDescriptor (recursively)- Parameters:
testExecutionContext- testExecutionContext
-