Package org.testng.internal
Class NoOpTestClass
- java.lang.Object
-
- org.testng.internal.NoOpTestClass
-
- All Implemented Interfaces:
IClass
,IObject
,ITestClass
public class NoOpTestClass extends java.lang.Object implements ITestClass, IObject
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.testng.internal.IObject
IObject.IdentifiableArrayObject, IObject.IdentifiableObject
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.List<ITestNGMethod>
m_afterClassMethods
protected java.util.List<ITestNGMethod>
m_afterGroupsMethods
protected java.util.List<ITestNGMethod>
m_afterSuiteMethods
protected java.util.List<ITestNGMethod>
m_afterTestConfMethods
protected java.util.List<ITestNGMethod>
m_afterTestMethods
protected java.util.List<ITestNGMethod>
m_beforeClassMethods
protected ITestNGMethod[]
m_beforeGroupsMethods
protected java.util.List<ITestNGMethod>
m_beforeSuiteMethods
protected java.util.List<ITestNGMethod>
m_beforeTestConfMethods
protected java.util.List<ITestNGMethod>
m_beforeTestMethods
protected java.lang.Class<?>
m_testClass
protected ITestNGMethod[]
m_testMethods
-
Constructor Summary
Constructors Modifier Constructor Description protected
NoOpTestClass()
NoOpTestClass(ITestClass testClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addInstance(java.lang.Object instance)
void
addObject(IObject.IdentifiableObject instance)
ITestNGMethod[]
getAfterClassMethods()
Returns all the methods that should be invoked after all the tests have been run on this class.ITestNGMethod[]
getAfterGroupsMethods()
Returns all @Configuration methods that should be invoked after certain groups.ITestNGMethod[]
getAfterSuiteMethods()
Returns all the methods that should be invoked after the suite has run.ITestNGMethod[]
getAfterTestConfigurationMethods()
Returns all @Configuration methods that should be invoked last before any others in the current test.ITestNGMethod[]
getAfterTestMethods()
Returns all the methods that should be invoked after a test method completes.ITestNGMethod[]
getBeforeClassMethods()
Return all the methods that should be invoked after the test class has been created and before any of its test methods is invoked.ITestNGMethod[]
getBeforeGroupsMethods()
Returns all @Configuration methods that should be invoked before certain groups.ITestNGMethod[]
getBeforeSuiteMethods()
Returns All the methods that should be invoked before the suite is run.ITestNGMethod[]
getBeforeTestConfigurationMethods()
Returns all @Configuration methods that should be invoked before any others in the current test.ITestNGMethod[]
getBeforeTestMethods()
Returns all the methods that should be invoked before a test method is invoked.long[]
getInstanceHashCodes()
java.lang.Object[]
getInstances(boolean reuse)
Returns all the instances the methods will be invoked upon.java.lang.String
getName()
IObject.IdentifiableObject[]
getObjects(boolean create, java.lang.String errorMsgPrefix)
Returns all the instances the methods will be invoked upon.java.lang.Class<?>
getRealClass()
ITestNGMethod[]
getTestMethods()
Returns all the applicable test methods.java.lang.String
getTestName()
XmlClass
getXmlClass()
XmlTest
getXmlTest()
void
setAfterTestMethod(ITestNGMethod[] afterTestMethods)
void
setBeforeTestMethods(ITestNGMethod[] beforeTestMethods)
void
setTestClass(java.lang.Class<?> declaringClass)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testng.IClass
getInstances
-
-
-
-
Field Detail
-
m_testClass
protected java.lang.Class<?> m_testClass
-
m_beforeClassMethods
protected java.util.List<ITestNGMethod> m_beforeClassMethods
-
m_beforeTestMethods
protected java.util.List<ITestNGMethod> m_beforeTestMethods
-
m_testMethods
protected ITestNGMethod[] m_testMethods
-
m_afterClassMethods
protected java.util.List<ITestNGMethod> m_afterClassMethods
-
m_afterTestMethods
protected java.util.List<ITestNGMethod> m_afterTestMethods
-
m_beforeSuiteMethods
protected java.util.List<ITestNGMethod> m_beforeSuiteMethods
-
m_afterSuiteMethods
protected java.util.List<ITestNGMethod> m_afterSuiteMethods
-
m_beforeTestConfMethods
protected java.util.List<ITestNGMethod> m_beforeTestConfMethods
-
m_afterTestConfMethods
protected java.util.List<ITestNGMethod> m_afterTestConfMethods
-
m_beforeGroupsMethods
protected ITestNGMethod[] m_beforeGroupsMethods
-
m_afterGroupsMethods
protected java.util.List<ITestNGMethod> m_afterGroupsMethods
-
-
Constructor Detail
-
NoOpTestClass
protected NoOpTestClass()
-
NoOpTestClass
public NoOpTestClass(ITestClass testClass)
-
-
Method Detail
-
setBeforeTestMethods
public void setBeforeTestMethods(ITestNGMethod[] beforeTestMethods)
-
setAfterTestMethod
public void setAfterTestMethod(ITestNGMethod[] afterTestMethods)
-
getAfterClassMethods
public ITestNGMethod[] getAfterClassMethods()
Description copied from interface:ITestClass
Returns all the methods that should be invoked after all the tests have been run on this class.- Specified by:
getAfterClassMethods
in interfaceITestClass
- Returns:
- Returns the afterClassMethods.
-
getAfterTestMethods
public ITestNGMethod[] getAfterTestMethods()
Description copied from interface:ITestClass
Returns all the methods that should be invoked after a test method completes.- Specified by:
getAfterTestMethods
in interfaceITestClass
- Returns:
- Returns the afterTestMethods.
-
getBeforeClassMethods
public ITestNGMethod[] getBeforeClassMethods()
Description copied from interface:ITestClass
Return all the methods that should be invoked after the test class has been created and before any of its test methods is invoked.- Specified by:
getBeforeClassMethods
in interfaceITestClass
- Returns:
- Returns the beforeClassMethods.
-
getBeforeTestMethods
public ITestNGMethod[] getBeforeTestMethods()
Description copied from interface:ITestClass
Returns all the methods that should be invoked before a test method is invoked.- Specified by:
getBeforeTestMethods
in interfaceITestClass
- Returns:
- Returns the beforeTestMethods.
-
getTestMethods
public ITestNGMethod[] getTestMethods()
Description copied from interface:ITestClass
Returns all the applicable test methods.- Specified by:
getTestMethods
in interfaceITestClass
- Returns:
- Returns the testMethods.
-
getBeforeSuiteMethods
public ITestNGMethod[] getBeforeSuiteMethods()
Description copied from interface:ITestClass
Returns All the methods that should be invoked before the suite is run.- Specified by:
getBeforeSuiteMethods
in interfaceITestClass
- Returns:
- All the methods that should be invoked before the suite is run.
-
getAfterSuiteMethods
public ITestNGMethod[] getAfterSuiteMethods()
Description copied from interface:ITestClass
Returns all the methods that should be invoked after the suite has run.- Specified by:
getAfterSuiteMethods
in interfaceITestClass
- Returns:
- All the methods that should be invoked after the suite has run.
-
getBeforeTestConfigurationMethods
public ITestNGMethod[] getBeforeTestConfigurationMethods()
Description copied from interface:ITestClass
Returns all @Configuration methods that should be invoked before any others in the current test.- Specified by:
getBeforeTestConfigurationMethods
in interfaceITestClass
- Returns:
- all @Configuration methods that should be invoked before any others in the current test.
-
getAfterTestConfigurationMethods
public ITestNGMethod[] getAfterTestConfigurationMethods()
Description copied from interface:ITestClass
Returns all @Configuration methods that should be invoked last before any others in the current test.- Specified by:
getAfterTestConfigurationMethods
in interfaceITestClass
- Returns:
- all @Configuration methods that should be invoked last before any others in the current test.
-
getBeforeGroupsMethods
public ITestNGMethod[] getBeforeGroupsMethods()
Description copied from interface:ITestClass
Returns all @Configuration methods that should be invoked before certain groups.- Specified by:
getBeforeGroupsMethods
in interfaceITestClass
- Returns:
- all @Configuration methods that should be invoked before certain groups
-
getAfterGroupsMethods
public ITestNGMethod[] getAfterGroupsMethods()
Description copied from interface:ITestClass
Returns all @Configuration methods that should be invoked after certain groups.- Specified by:
getAfterGroupsMethods
in interfaceITestClass
- Returns:
- all @Configuration methods that should be invoked after certain groups
-
getInstanceHashCodes
public long[] getInstanceHashCodes()
- Specified by:
getInstanceHashCodes
in interfaceIClass
- Specified by:
getInstanceHashCodes
in interfaceIObject
- Returns:
- - An array representing the hash codes of the corresponding instances.
- See Also:
IObject.getInstanceHashCodes()
-
getInstances
public java.lang.Object[] getInstances(boolean reuse)
Description copied from interface:IClass
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 interfaceIClass
- Parameters:
reuse
- flag if a new set of instances must be returned (if set tofalse
)- Returns:
- All the instances the methods will be invoked upon.
-
getName
public java.lang.String getName()
-
getRealClass
public java.lang.Class<?> getRealClass()
- Specified by:
getRealClass
in interfaceIClass
- Returns:
- the Java class corresponding to this IClass.
-
addInstance
public void addInstance(java.lang.Object instance)
- Specified by:
addInstance
in interfaceIClass
- Parameters:
instance
- - The instance to be added.
-
addObject
public void addObject(IObject.IdentifiableObject instance)
-
getObjects
public IObject.IdentifiableObject[] getObjects(boolean create, java.lang.String errorMsgPrefix)
Description copied from interface:IObject
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:
getObjects
in interfaceIObject
- Parameters:
create
- -true
if objects should be created before returning.errorMsgPrefix
- - Text that should be prefixed to the error message when there are issues. Can be empty.- Returns:
- - An array of
IObject.IdentifiableObject
objects
-
setTestClass
public void setTestClass(java.lang.Class<?> declaringClass)
-
getTestName
public java.lang.String getTestName()
- Specified by:
getTestName
in interfaceIClass
- Returns:
- its test name if this class implements org.testng.ITest, null otherwise.
-
getXmlTest
public XmlTest getXmlTest()
- Specified by:
getXmlTest
in interfaceIClass
- Returns:
- the <test> tag this class was found in.
-
getXmlClass
public XmlClass getXmlClass()
- Specified by:
getXmlClass
in interfaceIClass
- Returns:
- the *lt;class> tag this class was found in.
-
-