com.beust.testng
Class TestClass

java.lang.Object
  extended by com.beust.testng.TestClass
All Implemented Interfaces:
IClass, ITestClass

public class TestClass
extends java.lang.Object
implements ITestClass

This class represents a test class: - The test methods - The configuration methods (test and method) - The class file

Author:
cbeust

Constructor Summary
TestClass(IClass cls, java.lang.String testName, ITestMethodFinder testMethodFinder, IAnnotationFinder annotationFinder, RunInfo runInfo, TestRunner testRunner)
           
TestClass(IClass cls, TestClass tc)
           
 
Method Summary
 void addInstance(java.lang.Object instance)
           
 void dump()
           
 ITestNGMethod[] getAfterClassMethods()
           
 ITestNGMethod[] getAfterTestMethods()
           
 IAnnotationFinder getAnnotationFinder()
           
 ITestNGMethod[] getBeforeClassMethods()
           
 ITestNGMethod[] getBeforeTestMethods()
           
 java.lang.Object[] getInstances()
           
 java.lang.String getName()
           
 java.lang.Class getRealClass()
           
 java.lang.Class[] getTestClasses()
           
 ITestMethodFinder getTestMethodFinder()
           
 ITestNGMethod[] getTestMethods()
           
 java.lang.String getTestName()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TestClass

public TestClass(IClass cls,
                 java.lang.String testName,
                 ITestMethodFinder testMethodFinder,
                 IAnnotationFinder annotationFinder,
                 RunInfo runInfo,
                 TestRunner testRunner)

TestClass

public TestClass(IClass cls,
                 TestClass tc)
Method Detail

getTestName

public java.lang.String getTestName()

getAnnotationFinder

public IAnnotationFinder getAnnotationFinder()

getInstances

public java.lang.Object[] getInstances()
Specified by:
getInstances in interface IClass
Specified by:
getInstances in interface ITestClass
Returns:
All the instances the methods will be invoked upon. This will typically be an array of one object in the absence of an @Factory annotation.

addInstance

public void addInstance(java.lang.Object instance)
Specified by:
addInstance in interface IClass

getTestMethodFinder

public ITestMethodFinder getTestMethodFinder()

getName

public java.lang.String getName()
Specified by:
getName in interface IClass
Returns:
The name of this test class

getRealClass

public java.lang.Class getRealClass()
Specified by:
getRealClass in interface IClass

getTestClasses

public java.lang.Class[] getTestClasses()

dump

public void dump()

getAfterClassMethods

public ITestNGMethod[] getAfterClassMethods()
Specified by:
getAfterClassMethods in interface ITestClass
Returns:
Returns the afterClassMethods.

getAfterTestMethods

public ITestNGMethod[] getAfterTestMethods()
Specified by:
getAfterTestMethods in interface ITestClass
Returns:
Returns the afterTestMethods.

getBeforeClassMethods

public ITestNGMethod[] getBeforeClassMethods()
Specified by:
getBeforeClassMethods in interface ITestClass
Returns:
Returns the beforeClassMethods.

getBeforeTestMethods

public ITestNGMethod[] getBeforeTestMethods()
Specified by:
getBeforeTestMethods in interface ITestClass
Returns:
Returns the beforeTestMethods.

getTestMethods

public ITestNGMethod[] getTestMethods()
Specified by:
getTestMethods in interface ITestClass
Returns:
Returns the testMethods.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object