public abstract class AbstractClassTestDescriptor extends AbstractBranchTestDescriptor
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor, org.junit.platform.engine.support.hierarchical.Node.ExecutionMode, org.junit.platform.engine.support.hierarchical.Node.Invocation<C extends org.junit.platform.engine.support.hierarchical.EngineExecutionContext>, org.junit.platform.engine.support.hierarchical.Node.SkipResult| Modifier and Type | Field and Description |
|---|---|
(package private) java.util.List<java.lang.reflect.Method> |
afterAll
Class methods marked to execute after all tests
|
(package private) java.util.List<java.lang.reflect.Method> |
beforeAll
Class methods marked to execute before all tests
|
(package private) java.lang.Class |
clazz
The Java class.
|
parent| Modifier | Constructor and Description |
|---|---|
protected |
AbstractClassTestDescriptor()
Default constructor.
|
protected |
AbstractClassTestDescriptor(java.lang.Class<?> clazz,
java.lang.String displayName,
org.junit.platform.engine.TestDescriptor parent,
java.util.List<java.lang.reflect.Method> beforeAll,
java.util.List<java.lang.reflect.Method> afterAll)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
afterImpl()
Execute the after behavior of this node implementation.
|
void |
beforeImpl()
Execute the before behavior of this node implementation.
|
java.util.Optional<org.junit.platform.engine.TestSource> |
getSource()
Get the source of the test or container described
by this descriptor, if available.
|
void |
print(PrintHelper printer)
Print all class-specific fields.
|
void |
readExternal(java.io.ObjectInput in)
The object implements the readExternal method to restore its
contents by calling the methods of DataInput for primitive
types and readObject for objects, strings and arrays.
|
protected static java.lang.reflect.Method[] |
sort(java.util.List<java.lang.reflect.Method> methods)
Sort methods by the 'order' annotation attribute.
|
void |
writeExternal(java.io.ObjectOutput out)
The object implements the writeExternal method to save its contents
by calling the methods of DataOutput for its primitive values or
calling the writeObject method of ObjectOutput for objects, strings,
and arrays.
|
addChild, findByUniqueId, getChildren, getType, removeChild, removeFromHierarchyafter, before, callLFMethodsImpl, callMethodImpl, callMethodImpl, checkInstance, cleanUp, cleanUpImpl, execute, executeImpl, getTags, getTags, getTestObject, prepare, prepareImpl, toStringequals, getDisplayName, getParent, getUniqueId, hashCode, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitaround, getExclusiveResources, getExecutionMode, nodeFinished, nodeSkipped, shouldBeSkippedjava.util.List<java.lang.reflect.Method> afterAll
java.util.List<java.lang.reflect.Method> beforeAll
java.lang.Class clazz
protected AbstractClassTestDescriptor()
protected AbstractClassTestDescriptor(java.lang.Class<?> clazz,
java.lang.String displayName,
org.junit.platform.engine.TestDescriptor parent,
java.util.List<java.lang.reflect.Method> beforeAll,
java.util.List<java.lang.reflect.Method> afterAll)
clazz - the Java classdisplayName - the display nameparent - the parent descriptorbeforeAll - class methods marked to execute before all testsafterAll - class methods marked to execute after all testsprotected static final java.lang.reflect.Method[] sort(java.util.List<java.lang.reflect.Method> methods)
methods - the methods to sortpublic void afterImpl()
throws ErrorConditionException,
LegacyErrorException
This method will be called once after execution of this node.
afterImpl in class AbstractFWDTestDescriptorErrorConditionException - remote code may throw thisLegacyErrorExceptionpublic void beforeImpl()
throws ErrorConditionException,
LegacyErrorException
This method will be called once before execution of this node.
beforeImpl in class AbstractFWDTestDescriptorErrorConditionException - remote code may throw thisLegacyErrorExceptionpublic java.util.Optional<org.junit.platform.engine.TestSource> getSource()
getSource in interface org.junit.platform.engine.TestDescriptorgetSource in class NoopDescriptorTestSourcepublic void print(PrintHelper printer)
print in interface Printableprint in class NoopDescriptorprinter - the string printer to print intopublic void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class AbstractBranchTestDescriptorin - the stream to read data from in order to restore the objectjava.io.IOException - if I/O errors occurjava.lang.ClassNotFoundException - If the class for an object being
restored cannot be found.public void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class AbstractBranchTestDescriptorout - the stream to write the object tojava.io.IOException - Includes any I/O exceptions that may occur