Package org.testng
Interface IClass
-
- All Known Subinterfaces:
ITestClass
- All Known Implementing Classes:
ClassImpl
,NoOpTestClass
public interface IClass
IClass
represents a test class and a collection of its instances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description void
addInstance(java.lang.Object instance)
Deprecated.- As of TestNGv7.10.0
long[]
getInstanceHashCodes()
Deprecated.- As of TestNGv7.10.0
java.lang.Object[]
getInstances(boolean create)
Deprecated.- As of TestNGv7.10.0
default java.lang.Object[]
getInstances(boolean create, java.lang.String errorMsgPrefix)
Deprecated.- As of TestNGv7.10.0
java.lang.String
getName()
java.lang.Class<?>
getRealClass()
java.lang.String
getTestName()
XmlClass
getXmlClass()
XmlTest
getXmlTest()
-
-
-
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()
- Returns:
- its test name if this class implements org.testng.ITest, null otherwise.
-
getRealClass
java.lang.Class<?> getRealClass()
- Returns:
- the Java class corresponding to this IClass.
-
getInstances
@Deprecated java.lang.Object[] getInstances(boolean create)
Deprecated.- As of TestNGv7.10.0
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
@Deprecated default java.lang.Object[] getInstances(boolean create, java.lang.String errorMsgPrefix)
Deprecated.- As of TestNGv7.10.0
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
)errorMsgPrefix
- - Text that should be prefixed to the error message when there are issues. Can be empty.- Returns:
- All the instances the methods will be invoked upon.
-
getInstanceHashCodes
@Deprecated long[] getInstanceHashCodes()
Deprecated.- As of TestNGv7.10.0
-
addInstance
@Deprecated void addInstance(java.lang.Object instance)
Deprecated.- As of TestNGv7.10.0
- Parameters:
instance
- - The instance to be added.
-
-