org.testng
Class TestClass
java.lang.Object
org.testng.internal.NoOpTestClass
org.testng.TestClass
- All Implemented Interfaces:
- Serializable, IClass, ITestClass
public class TestClass
- extends org.testng.internal.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
- See Also:
- Serialized Form
Fields inherited from class org.testng.internal.NoOpTestClass |
m_afterClassMethods, m_afterGroupsMethods, m_afterSuiteMethods, m_afterTestConfMethods, m_afterTestMethods, m_beforeClassMethods, m_beforeGroupsMethods, m_beforeSuiteMethods, m_beforeTestConfMethods, m_beforeTestMethods, m_testClass, m_testMethods |
Methods inherited from class org.testng.internal.NoOpTestClass |
getAfterClassMethods, getAfterGroupsMethods, getAfterSuiteMethods, getAfterTestConfigurationMethods, getAfterTestMethods, getBeforeClassMethods, getBeforeGroupsMethods, getBeforeSuiteMethods, getBeforeTestConfigurationMethods, getBeforeTestMethods, getName, getRealClass, getTestMethods, setAfterTestMethod, setBeforeTestMethods, setTestClass |
Methods inherited from interface org.testng.ITestClass |
getAfterClassMethods, getAfterGroupsMethods, getAfterSuiteMethods, getAfterTestConfigurationMethods, getAfterTestMethods, getBeforeClassMethods, getBeforeGroupsMethods, getBeforeSuiteMethods, getBeforeTestConfigurationMethods, getBeforeTestMethods, getTestMethods |
TestClass
public TestClass(IClass cls,
ITestMethodFinder testMethodFinder,
org.testng.internal.annotations.IAnnotationFinder annotationFinder,
org.testng.internal.RunInfo runInfo,
XmlTest xmlTest,
XmlClass xmlClass)
getTestName
public 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
- Overrides:
getTestName
in class org.testng.internal.NoOpTestClass
- Returns:
- the name of this test if the class implements org.testng.ITest, null otherwise.
getXmlTest
public XmlTest getXmlTest()
- Specified by:
getXmlTest
in interface IClass
- Overrides:
getXmlTest
in class org.testng.internal.NoOpTestClass
- Returns:
- the <test> tag this class was found in.
getXmlClass
public XmlClass getXmlClass()
- Specified by:
getXmlClass
in interface IClass
- Overrides:
getXmlClass
in class org.testng.internal.NoOpTestClass
- Returns:
- the *lt;class> tag this class was found in.
getAnnotationFinder
public org.testng.internal.annotations.IAnnotationFinder getAnnotationFinder()
getInstances
public 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
- Overrides:
getInstances
in class org.testng.internal.NoOpTestClass
- 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
- Overrides:
getInstanceHashCodes
in class org.testng.internal.NoOpTestClass
getInstanceCount
public int getInstanceCount()
- Specified by:
getInstanceCount
in interface IClass
- Specified by:
getInstanceCount
in interface ITestClass
- Overrides:
getInstanceCount
in class org.testng.internal.NoOpTestClass
- 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(Object instance)
- Specified by:
addInstance
in interface IClass
- Overrides:
addInstance
in class org.testng.internal.NoOpTestClass
getTestMethodFinder
public ITestMethodFinder getTestMethodFinder()
dump
public void dump()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2010. All Rights Reserved.