Package org.testng
Interface IClass
- All Known Subinterfaces:
ITestClass
- All Known Implementing Classes:
ClassImpl,JUnit3TestClass,JUnit4TestClass,JUnitTestClass,NoOpTestClass,TestClass
public interface IClass
IClass represents a test class and a collection of its instances.-
Method Summary
Modifier and TypeMethodDescriptionvoidaddInstance(Object instance) long[]Object[]getInstances(boolean create) Returns all the instances the methods will be invoked upon.default Object[]getInstances(boolean create, String errorMsgPrefix) getName()Class<?>
-
Method Details
-
getName
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
String getTestName()- Returns:
- its test name if this class implements org.testng.ITest, null otherwise.
-
getRealClass
Class<?> getRealClass()- Returns:
- the Java class corresponding to this IClass.
-
getInstances
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 tofalse)- Returns:
- All the instances the methods will be invoked upon.
-
getInstances
-
getInstanceHashCodes
long[] getInstanceHashCodes() -
addInstance
-