public abstract class AbstractFWDTestDescriptor extends NoopDescriptor
Node interface: all methods are passed to a proxy to be executed on the server.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 |
|---|---|
private java.util.Set<org.junit.platform.engine.TestTag> |
tags
The tags
|
parent| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFWDTestDescriptor()
Default constructor.
|
|
AbstractFWDTestDescriptor(org.junit.platform.engine.UniqueId uniqueId,
java.lang.String displayName,
java.util.Set<org.junit.platform.engine.TestTag> tags)
The constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
after(FWDEngineExecutionContext context)
Execute the after behavior of this node.
|
void |
afterImpl()
Execute the after behavior of this node implementation.
|
FWDEngineExecutionContext |
before(FWDEngineExecutionContext context)
Execute the before behavior of this node.
|
void |
beforeImpl()
Execute the before behavior of this node implementation.
|
protected void |
callLFMethodsImpl(java.util.List<java.lang.reflect.Method> methods)
Convenience method to execute all of life-cycle methods of a kind.
|
protected BaseDataType |
callMethodImpl(java.lang.reflect.Method method,
CallParameter[] parameterList)
Execute list of methods implementation, collect the result.
|
protected BaseDataType |
callMethodImpl(java.lang.reflect.Method method,
java.lang.Object o,
CallParameter[] parameters)
Execute a method.
|
protected void |
checkInstance(handle h)
Throw error if the procedure instance is not valid.
|
void |
cleanUp(FWDEngineExecutionContext context)
Clean up the supplied
context after execution. |
void |
cleanUpImpl()
Clean up the supplied
context after execution implementation. |
FWDEngineExecutionContext |
execute(FWDEngineExecutionContext context,
org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor)
Execute the behavior of this node.
|
void |
executeImpl()
Execute the implementation behavior of this node.
|
java.util.Set<org.junit.platform.engine.TestTag> |
getTags()
Get the set of tags associated with this descriptor.
|
protected static java.util.Set<org.junit.platform.engine.TestTag> |
getTags(java.lang.reflect.AnnotatedElement o)
Extract set of
TestTag from tag-related annotations. |
protected java.lang.Object |
getTestObject()
Get test object.
|
FWDEngineExecutionContext |
prepare(FWDEngineExecutionContext context)
Prepare the supplied
context prior to execution. |
void |
prepareImpl()
Prepare the supplied
context prior to execution implementation. |
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.
|
java.lang.String |
toString()
Returns a string representation of the object.
|
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, equals, findByUniqueId, getChildren, getDisplayName, getParent, getSource, getType, getUniqueId, hashCode, print, removeChild, removeFromHierarchy, setParentclone, finalize, getClass, notify, notifyAll, wait, wait, waitaround, getExclusiveResources, getExecutionMode, nodeFinished, nodeSkipped, shouldBeSkippedpublic AbstractFWDTestDescriptor(org.junit.platform.engine.UniqueId uniqueId,
java.lang.String displayName,
java.util.Set<org.junit.platform.engine.TestTag> tags)
uniqueId - the descriptor unique IDdisplayName - the descriptor display nametags - the tag setprotected AbstractFWDTestDescriptor()
protected static final java.util.Set<org.junit.platform.engine.TestTag> getTags(java.lang.reflect.AnnotatedElement o)
TestTag from tag-related annotations.o - the source of tag annotationspublic void after(FWDEngineExecutionContext context) throws ErrorConditionException, org.opentest4j.AssertionFailedError
This method will be called once after execution of this node.
context - the context to execute inErrorConditionExceptionorg.opentest4j.AssertionFailedErrorpublic void afterImpl()
throws ErrorConditionException
This method will be called once after execution of this node.
ErrorConditionException - remote code may throw thispublic FWDEngineExecutionContext before(FWDEngineExecutionContext context) throws ErrorConditionException, org.opentest4j.AssertionFailedError
This method will be called once before execution of this node.
context - the context to execute innullErrorConditionExceptionorg.opentest4j.AssertionFailedErrorpublic void beforeImpl()
throws ErrorConditionException
This method will be called once before execution of this node.
ErrorConditionException - remote code may throw thispublic void cleanUp(FWDEngineExecutionContext context) throws ErrorConditionException, org.opentest4j.AssertionFailedError
context after execution.
Reset the test class instance.
context - the context to execute inErrorConditionExceptionorg.opentest4j.AssertionFailedErrorprepare(com.goldencode.p2j.testengine.FWDEngineExecutionContext)public void cleanUpImpl()
throws ErrorConditionException
context after execution implementation.
Reset the test class instance.
ErrorConditionException - remote code may throw thisprepare(com.goldencode.p2j.testengine.FWDEngineExecutionContext)public FWDEngineExecutionContext execute(FWDEngineExecutionContext context, org.junit.platform.engine.support.hierarchical.Node.DynamicTestExecutor dynamicTestExecutor) throws ErrorConditionException, org.opentest4j.AssertionFailedError
Containers typically do not implement this method since the
HierarchicalTestEngine handles execution of their children.
The supplied dynamicTestExecutor may be used to submit
additional dynamic tests for immediate execution.
execute in interface org.junit.platform.engine.support.hierarchical.Node<FWDEngineExecutionContext>execute in class NoopDescriptorcontext - the context to execute indynamicTestExecutor - the executor to submit dynamic tests toErrorConditionExceptionorg.opentest4j.AssertionFailedErrorNode.before(C),
Node.after(C)public void executeImpl()
throws ErrorConditionException
ErrorConditionException - remote code may throw thispublic java.util.Set<org.junit.platform.engine.TestTag> getTags()
getTags in interface org.junit.platform.engine.TestDescriptorgetTags in class NoopDescriptornull
but potentially emptyTestTagpublic FWDEngineExecutionContext prepare(FWDEngineExecutionContext context) throws ErrorConditionException, org.opentest4j.AssertionFailedError
context prior to execution.
Create test class instance.
ErrorConditionExceptionorg.opentest4j.AssertionFailedErrorcleanUp(com.goldencode.p2j.testengine.FWDEngineExecutionContext)public void prepareImpl()
throws ErrorConditionException
context prior to execution implementation.ErrorConditionException - remote code may throw thisorg.opentest4j.AssertionFailedError - legacy errors are converted to this exceptioncleanUpImpl()public void readExternal(java.io.ObjectInput in)
throws java.io.IOException,
java.lang.ClassNotFoundException
readExternal in interface java.io.ExternalizablereadExternal in class NoopDescriptorin - 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 java.lang.String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString in class NoopDescriptorpublic void writeExternal(java.io.ObjectOutput out)
throws java.io.IOException
writeExternal in interface java.io.ExternalizablewriteExternal in class NoopDescriptorout - the stream to write the object tojava.io.IOException - Includes any I/O exceptions that may occurprotected final void callLFMethodsImpl(java.util.List<java.lang.reflect.Method> methods)
throws ErrorConditionException
methods - the methods to execute, possibly emptyErrorConditionException - the first thrown by any methodbeforeImpl(),
afterImpl()protected BaseDataType callMethodImpl(java.lang.reflect.Method method, CallParameter[] parameterList)
method - the method to executeparameterList - the method call arguments or null for no argumentsnull value
is used for methods returning VOID or a legacy error occurredexecuteImpl()protected BaseDataType callMethodImpl(java.lang.reflect.Method method, java.lang.Object o, CallParameter[] parameters) throws ErrorConditionException, LegacyErrorException
method - the method to executeo - the object to use, can be null for "static" methods.parameters - method call parameters, null for no parametersnull for methods returning VOID
or if a legacy error was raisedErrorConditionException - by the executed legacy codeLegacyErrorException - legacy errors are not caught by this methodprotected java.lang.Object getTestObject()
The value should be null if the test method is a static legacy class method.
nullprotected final void checkInstance(handle h)
h - the instance handle