org.testng
Class TestClass
java.lang.Object
NoOpTestClass
org.testng.TestClass
- All Implemented Interfaces:
- java.io.Serializable, IClass, ITestClass
public class TestClass
- extends NoOpTestClass
- implements ITestClass
This class represents a test class:
- The test methods
- The configuration methods (test and method)
- The class file
- Author:
- Cedric Beust, Alexandru Popescu
|
Field Summary |
protected java.util.Map<java.lang.Class,java.lang.Object[]> |
m_instanceMap
|
protected java.util.Map<java.lang.Class,java.lang.Class> |
m_testClasses
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.testng.ITestClass |
getAfterClassMethods, getAfterGroupsMethods, getAfterSuiteMethods, getAfterTestConfigurationMethods, getAfterTestMethods, getBeforeClassMethods, getBeforeGroupsMethods, getBeforeSuiteMethods, getBeforeTestConfigurationMethods, getBeforeTestMethods, getTestMethods |
m_testClasses
protected transient java.util.Map<java.lang.Class,java.lang.Class> m_testClasses
m_instanceMap
protected transient java.util.Map<java.lang.Class,java.lang.Object[]> m_instanceMap
TestClass
public TestClass(IClass cls,
java.lang.String testName,
ITestMethodFinder testMethodFinder,
IAnnotationFinder annotationFinder,
RunInfo runInfo,
XmlTest xmlTest)
TestClass
public TestClass(IClass cls,
TestClass tc)
getTestName
public java.lang.String getTestName()
- Description copied from interface:
IClass
- If this class implements ITest, returns its test name, otherwise returns null.
- Specified by:
getTestName in interface IClass
getXmlTest
public XmlTest getXmlTest()
getAnnotationFinder
public IAnnotationFinder getAnnotationFinder()
getInstances
public java.lang.Object[] getInstances(boolean create)
- Description copied from 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 a @Factory annotation.
- Specified by:
getInstances in interface IClass- Specified by:
getInstances in interface ITestClass
- Parameters:
create - flag if a new set of instances must be returned
(if set to false)
- Returns:
- All the instances the methods will be invoked upon.
getInstanceHashCodes
public long[] getInstanceHashCodes()
- Description copied from interface:
ITestClass
- TODO cquezel JavaDoc.
- Specified by:
getInstanceHashCodes in interface IClass- Specified by:
getInstanceHashCodes in interface ITestClass
getInstanceCount
public int getInstanceCount()
- Specified by:
getInstanceCount in interface IClass- Specified by:
getInstanceCount in interface ITestClass
- Returns:
- The number of instances used in this class. This method
is needed for serialization since we don't know ahead of time if the
instances of the test classes will be serializable.
addInstance
public void addInstance(java.lang.Object instance)
- Specified by:
addInstance in interface IClass
getTestMethodFinder
public ITestMethodFinder getTestMethodFinder()
dump
public void dump()
toString
public java.lang.String toString()