Class NoOpTestClass

java.lang.Object
org.testng.internal.NoOpTestClass
All Implemented Interfaces:
IClass, IObject, ITestClass

public class NoOpTestClass extends Object implements ITestClass, IObject
  • Field Details

  • Constructor Details

    • NoOpTestClass

      protected NoOpTestClass()
    • NoOpTestClass

      public NoOpTestClass(ITestClass testClass)
  • Method Details

    • setBeforeTestMethods

      public void setBeforeTestMethods(ITestNGMethod[] beforeTestMethods)
    • setAfterTestMethod

      public void setAfterTestMethod(ITestNGMethod[] afterTestMethods)
    • getAfterClassMethods

      public ITestNGMethod[] getAfterClassMethods()
      Description copied from interface: ITestClass
      Returns all the methods that should be invoked after all the tests have been run on this class.
      Specified by:
      getAfterClassMethods in interface ITestClass
      Returns:
      Returns the afterClassMethods.
    • getAfterTestMethods

      public ITestNGMethod[] getAfterTestMethods()
      Description copied from interface: ITestClass
      Returns all the methods that should be invoked after a test method completes.
      Specified by:
      getAfterTestMethods in interface ITestClass
      Returns:
      Returns the afterTestMethods.
    • getBeforeClassMethods

      public ITestNGMethod[] getBeforeClassMethods()
      Description copied from interface: ITestClass
      Return all the methods that should be invoked after the test class has been created and before any of its test methods is invoked.
      Specified by:
      getBeforeClassMethods in interface ITestClass
      Returns:
      Returns the beforeClassMethods.
    • getBeforeTestMethods

      public ITestNGMethod[] getBeforeTestMethods()
      Description copied from interface: ITestClass
      Returns all the methods that should be invoked before a test method is invoked.
      Specified by:
      getBeforeTestMethods in interface ITestClass
      Returns:
      Returns the beforeTestMethods.
    • getTestMethods

      public ITestNGMethod[] getTestMethods()
      Description copied from interface: ITestClass
      Returns all the applicable test methods.
      Specified by:
      getTestMethods in interface ITestClass
      Returns:
      Returns the testMethods.
    • getBeforeSuiteMethods

      public ITestNGMethod[] getBeforeSuiteMethods()
      Description copied from interface: ITestClass
      Returns All the methods that should be invoked before the suite is run.
      Specified by:
      getBeforeSuiteMethods in interface ITestClass
      Returns:
      All the methods that should be invoked before the suite is run.
    • getAfterSuiteMethods

      public ITestNGMethod[] getAfterSuiteMethods()
      Description copied from interface: ITestClass
      Returns all the methods that should be invoked after the suite has run.
      Specified by:
      getAfterSuiteMethods in interface ITestClass
      Returns:
      All the methods that should be invoked after the suite has run.
    • getBeforeTestConfigurationMethods

      public ITestNGMethod[] getBeforeTestConfigurationMethods()
      Description copied from interface: ITestClass
      Returns all @Configuration methods that should be invoked before any others in the current test.
      Specified by:
      getBeforeTestConfigurationMethods in interface ITestClass
      Returns:
      all @Configuration methods that should be invoked before any others in the current test.
    • getAfterTestConfigurationMethods

      public ITestNGMethod[] getAfterTestConfigurationMethods()
      Description copied from interface: ITestClass
      Returns all @Configuration methods that should be invoked last before any others in the current test.
      Specified by:
      getAfterTestConfigurationMethods in interface ITestClass
      Returns:
      all @Configuration methods that should be invoked last before any others in the current test.
    • getBeforeGroupsMethods

      public ITestNGMethod[] getBeforeGroupsMethods()
      Description copied from interface: ITestClass
      Returns all @Configuration methods that should be invoked before certain groups.
      Specified by:
      getBeforeGroupsMethods in interface ITestClass
      Returns:
      all @Configuration methods that should be invoked before certain groups
    • getAfterGroupsMethods

      public ITestNGMethod[] getAfterGroupsMethods()
      Description copied from interface: ITestClass
      Returns all @Configuration methods that should be invoked after certain groups.
      Specified by:
      getAfterGroupsMethods in interface ITestClass
      Returns:
      all @Configuration methods that should be invoked after certain groups
    • getInstanceHashCodes

      public long[] getInstanceHashCodes()
      Specified by:
      getInstanceHashCodes in interface IClass
      Specified by:
      getInstanceHashCodes in interface IObject
      Returns:
      - An array representing the hash codes of the corresponding instances.
      See Also:
    • getInstances

      public Object[] getInstances(boolean reuse)
      Description copied from interface: IClass
      Returns all the instances the methods will be invoked upon. This will typically be an array of one object in the absence of a @Factory annotation.
      Specified by:
      getInstances in interface IClass
      Parameters:
      reuse - flag if a new set of instances must be returned (if set to false)
      Returns:
      All the instances the methods will be invoked upon.
    • getName

      public String getName()
      Specified by:
      getName in interface IClass
      Returns:
      this test class name. This is the name of the corresponding Java class.
    • getRealClass

      public Class<?> getRealClass()
      Specified by:
      getRealClass in interface IClass
      Returns:
      the Java class corresponding to this IClass.
    • addInstance

      public void addInstance(Object instance)
      Specified by:
      addInstance in interface IClass
      Parameters:
      instance - - The instance to be added.
    • addObject

      public void addObject(IObject.IdentifiableObject instance)
      Specified by:
      addObject in interface IObject
      Parameters:
      instance - - The instance that should be added to the list of instances.
    • getObjects

      public IObject.IdentifiableObject[] getObjects(boolean create, String errorMsgPrefix)
      Description copied from interface: IObject
      Returns all the instances the methods will be invoked upon. This will typically be an array of one object in the absence of a @Factory annotation.
      Specified by:
      getObjects in interface IObject
      Parameters:
      create - - true if objects should be created before returning.
      errorMsgPrefix - - Text that should be prefixed to the error message when there are issues. Can be empty.
      Returns:
      - An array of IObject.IdentifiableObject objects
    • setTestClass

      public void setTestClass(Class<?> declaringClass)
    • getTestName

      public String getTestName()
      Specified by:
      getTestName in interface IClass
      Returns:
      its test name if this class implements org.testng.ITest, null otherwise.
    • getXmlTest

      public XmlTest getXmlTest()
      Specified by:
      getXmlTest in interface IClass
      Returns:
      the <test> tag this class was found in.
    • getXmlClass

      public XmlClass getXmlClass()
      Specified by:
      getXmlClass in interface IClass
      Returns:
      the *lt;class> tag this class was found in.