Package org.testng
Interface IClass
-
- All Known Subinterfaces:
ITestClass
- All Known Implementing Classes:
ClassImpl,JUnit3TestClass,JUnit4TestClass,JUnitTestClass,NoOpTestClass,TestClass
public interface IClassIClassrepresents a test class and a collection of its instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voidaddInstance(java.lang.Object instance)intgetInstanceCount()Deprecated.Not usedlong[]getInstanceHashCodes()java.lang.Object[]getInstances(boolean create)Returns all the instances the methods will be invoked upon.java.lang.StringgetName()java.lang.Class<?>getRealClass()java.lang.StringgetTestName()If this class implements org.testng.ITest, returns its test name, otherwise returns null.XmlClassgetXmlClass()XmlTestgetXmlTest()
-
-
-
Method Detail
-
getName
java.lang.String getName()
- Returns:
- this test class name. This is the name of the corresponding Java class.
-
getXmlTest
XmlTest getXmlTest()
- Returns:
- the <test> tag this class was found in.
-
getXmlClass
XmlClass getXmlClass()
- Returns:
- the *lt;class> tag this class was found in.
-
getTestName
java.lang.String getTestName()
If this class implements org.testng.ITest, returns its test name, otherwise returns null.
-
getRealClass
java.lang.Class<?> getRealClass()
- Returns:
- the Java class corresponding to this IClass.
-
getInstances
java.lang.Object[] getInstances(boolean create)
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.- 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.
-
getInstanceCount
@Deprecated int getInstanceCount()
Deprecated.Not used- 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.
-
getInstanceHashCodes
long[] getInstanceHashCodes()
-
addInstance
void addInstance(java.lang.Object instance)
-
-