Class GenericMethodWrapper

java.lang.Object
dev.galasa.framework.GenericMethodWrapper

public class GenericMethodWrapper extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • createCopyGenericMethodWrapper

      public GenericMethodWrapper 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 test
      testClassObject - the test class
      testMethod - 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

      public TestMethod getGenericMethodStructure()
      This returns the test structure for this generic method.
      Returns:
      the existing TestMethod structure for this generic method.
    • fullStop

      public boolean fullStop()
    • getResult

      public Result getResult()
    • setResult

      public void setResult(Result result)
    • setRunLogStart

      public void setRunLogStart(long runLogStart)
    • setRunLogEnd

      public void setRunLogEnd(long runLogEnd)
    • getName

      public String getName()
    • getType

      public GenericMethodWrapper.Type getType()
    • getExecutionMethod

      public Method getExecutionMethod()