Class RunnableMethodTestDescriptor
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
-
- org.antublue.test.engine.internal.descriptor.RunnableMethodTestDescriptor
-
- All Implemented Interfaces:
Runnable,org.junit.platform.engine.TestDescriptor
public final class RunnableMethodTestDescriptor extends org.junit.platform.engine.support.descriptor.AbstractTestDescriptorClass to implement a Runnable test method descriptor
-
-
Constructor Summary
Constructors Constructor Description RunnableMethodTestDescriptor(org.junit.platform.engine.UniqueId uniqueId, String displayName, Class<?> testClass, Parameter testParameter, Method testMethod)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidflush()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>getSource()Method to get the TestSourceClass<?>getTestClass()Method to get the test classprotected TestExecutionContextgetTestExecutionContext()Method to get the TestExecutionContextMethodgetTestMethod()Method to get the test methodParametergetTestParameter()Method to get the test parameterprotected ThrowableCollectorgetThrowableCollector()Method to get the test descriptors ThrowableCollectororg.junit.platform.engine.TestDescriptor.TypegetType()Method to get the test descriptor TypebooleanisContainer()Method to return whether the test descriptor is a containerbooleanisTest()Method to return whether the test descriptor is a testprotected static Throwableresolve(Throwable t)Method to resolve an Exception to the underlying Exceptionvoidrun()Method to run the test descriptor
The TestExecutionContext must be set prior to the callvoidsetTestExecutionContext(TestExecutionContext testExecutionContext)Method to set the TestExecutionContext-
Methods inherited from class org.junit.platform.engine.support.descriptor.AbstractTestDescriptor
addChild, equals, findByUniqueId, getChildren, getDisplayName, getParent, getTags, getUniqueId, hashCode, removeChild, removeFromHierarchy, setParent, toString
-
-
-
-
Method Detail
-
getSource
public Optional<org.junit.platform.engine.TestSource> getSource()
Method to get the TestSource- Specified by:
getSourcein interfaceorg.junit.platform.engine.TestDescriptor- Overrides:
getSourcein classorg.junit.platform.engine.support.descriptor.AbstractTestDescriptor- Returns:
-
getType
public org.junit.platform.engine.TestDescriptor.Type getType()
Method to get the test descriptor Type- Returns:
-
isTest
public boolean isTest()
Method to return whether the test descriptor is a test- Returns:
-
isContainer
public boolean isContainer()
Method to return whether the test descriptor is a container- Returns:
-
getTestClass
public Class<?> getTestClass()
Method to get the test class- Returns:
-
getTestParameter
public Parameter getTestParameter()
Method to get the test parameter- Returns:
-
getTestMethod
public Method getTestMethod()
Method to get the test method- Returns:
-
run
public void run()
Method to run the test descriptor
The TestExecutionContext must be set prior to the call
-
getChildren
public <T> List<T> getChildren(Class<T> clazz)
Method to get a List of children cast as a specific class- Type Parameters:
T-- Parameters:
clazz-- Returns:
-
setTestExecutionContext
public void setTestExecutionContext(TestExecutionContext testExecutionContext)
Method to set the TestExecutionContext- Parameters:
testExecutionContext-
-
getTestExecutionContext
protected TestExecutionContext getTestExecutionContext()
Method to get the TestExecutionContext- Returns:
-
getThrowableCollector
protected ThrowableCollector getThrowableCollector()
Method to get the test descriptors ThrowableCollector- Returns:
-
resolve
protected static Throwable resolve(Throwable t)
Method to resolve an Exception to the underlying Exception- Parameters:
t-- Returns:
-
flush
public void flush()
Method to flush System.out and System.err PrintStreams
-
-