Package dev.galasa.framework
Class GenericMethodWrapper
java.lang.Object
dev.galasa.framework.GenericMethodWrapper
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionGenericMethodWrapper(Method executionMethod, Class<?> testClass, GenericMethodWrapper.Type type) -
Method Summary
Modifier and TypeMethodDescriptionThis method creates a copy of this GenericMethodWrapper which is used when creating the wrapper for a @Test method.booleanfullStop()This returns the test structure for this generic method.getName()getType()voidThis initialises the test structure for this generic method.voidinvoke(@NotNull ITestRunManagers managers, Object testClassObject, GenericMethodWrapper testMethod, TestClassWrapper testClassWrapper) Run the supplied methodvoidsaveRunLogStartAndEnd(long runLogStart, long runLogEnd) voidvoidsetRunLogEnd(long runLogEnd) voidsetRunLogStart(long runLogStart)
-
Field Details
-
LOG_METHOD_BEFORE_CLASS
- See Also:
-
LOG_METHOD_BEFORE
- See Also:
-
LOG_METHOD_TEST
- See Also:
-
LOG_METHOD_AFTER
- See Also:
-
LOG_METHOD_AFTER_CLASS
- See Also:
-
-
Constructor Details
-
GenericMethodWrapper
public GenericMethodWrapper(Method executionMethod, Class<?> testClass, GenericMethodWrapper.Type type)
-
-
Method Details
-
createCopyGenericMethodWrapper
This method creates a copy of this GenericMethodWrapper which is used when creating the wrapper for a @Test method. Each @Test method should have its own copy of the test's @Befores and @Afters, instead of pointing to the same set of @Befores and @Afters. This ensures each @Before/@After has a unique test structure.- Returns:
- a copy of this GenericMethodWrapper.
-
invoke
public void invoke(@NotNull @NotNull ITestRunManagers managers, Object testClassObject, GenericMethodWrapper testMethod, TestClassWrapper testClassWrapper) throws TestRunException Run the supplied method- Parameters:
managers- the managers used in this testtestClassObject- the test classtestMethod- the test method if the execution method is @Before or @After- Throws:
TestRunException- The failure thrown by the test run
-
saveRunLogStartAndEnd
public void saveRunLogStartAndEnd(long runLogStart, long runLogEnd) -
initialiseGenericMethodStructure
public void initialiseGenericMethodStructure()This initialises the test structure for this generic method. A generic method is a @BeforeClass, @Before, @After or @AfterClass so the test structure is initialised with just a name and type. It can be retrieved with getGenericMethodStructure(). -
getGenericMethodStructure
This returns the test structure for this generic method.- Returns:
- the existing TestMethod structure for this generic method.
-
fullStop
public boolean fullStop() -
getResult
-
setResult
-
setRunLogStart
public void setRunLogStart(long runLogStart) -
setRunLogEnd
public void setRunLogEnd(long runLogEnd) -
getName
-
getType
-
getExecutionMethod
-