Package org.testng.internal
Class NoOpTestClass
- java.lang.Object
-
- org.testng.internal.NoOpTestClass
-
- All Implemented Interfaces:
IClass,ITestClass
- Direct Known Subclasses:
TestClass
public class NoOpTestClass extends java.lang.Object implements ITestClass
-
-
Field Summary
Fields Modifier and Type Field Description protected ITestNGMethod[]m_afterClassMethodsprotected ITestNGMethod[]m_afterGroupsMethodsprotected ITestNGMethod[]m_afterSuiteMethodsprotected ITestNGMethod[]m_afterTestConfMethodsprotected ITestNGMethod[]m_afterTestMethodsprotected ITestNGMethod[]m_beforeClassMethodsprotected ITestNGMethod[]m_beforeGroupsMethodsprotected ITestNGMethod[]m_beforeSuiteMethodsprotected ITestNGMethod[]m_beforeTestConfMethodsprotected ITestNGMethod[]m_beforeTestMethodsprivate long[]m_instanceHashesprivate java.lang.Object[]m_instancesprotected java.lang.Class<?>m_testClassprotected ITestNGMethod[]m_testMethodsprivate XmlClassm_xmlClassprivate XmlTestm_xmlTest
-
Constructor Summary
Constructors Modifier Constructor Description protectedNoOpTestClass()NoOpTestClass(ITestClass testClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaddInstance(java.lang.Object 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.intgetInstanceCount()Deprecated.long[]getInstanceHashCodes()java.lang.Object[]getInstances(boolean reuse)Returns all the instances the methods will be invoked upon.java.lang.StringgetName()java.lang.ClassgetRealClass()ITestNGMethod[]getTestMethods()Returns all the applicable test methods.java.lang.StringgetTestName()If this class implements org.testng.ITest, returns its test name, otherwise returns null.XmlClassgetXmlClass()XmlTestgetXmlTest()voidsetAfterTestMethod(ITestNGMethod[] afterTestMethods)voidsetBeforeTestMethods(ITestNGMethod[] beforeTestMethods)voidsetTestClass(java.lang.Class<?> declaringClass)
-
-
-
Field Detail
-
m_testClass
protected java.lang.Class<?> m_testClass
-
m_beforeClassMethods
protected ITestNGMethod[] m_beforeClassMethods
-
m_beforeTestMethods
protected ITestNGMethod[] m_beforeTestMethods
-
m_testMethods
protected ITestNGMethod[] m_testMethods
-
m_afterClassMethods
protected ITestNGMethod[] m_afterClassMethods
-
m_afterTestMethods
protected ITestNGMethod[] m_afterTestMethods
-
m_beforeSuiteMethods
protected ITestNGMethod[] m_beforeSuiteMethods
-
m_afterSuiteMethods
protected ITestNGMethod[] m_afterSuiteMethods
-
m_beforeTestConfMethods
protected ITestNGMethod[] m_beforeTestConfMethods
-
m_afterTestConfMethods
protected ITestNGMethod[] m_afterTestConfMethods
-
m_beforeGroupsMethods
protected ITestNGMethod[] m_beforeGroupsMethods
-
m_afterGroupsMethods
protected ITestNGMethod[] m_afterGroupsMethods
-
m_instances
private final java.lang.Object[] m_instances
-
m_instanceHashes
private final long[] m_instanceHashes
-
m_xmlTest
private final XmlTest m_xmlTest
-
m_xmlClass
private final XmlClass m_xmlClass
-
-
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:ITestClassReturns all the methods that should be invoked after all the tests have been run on this class.- Specified by:
getAfterClassMethodsin interfaceITestClass- Returns:
- Returns the afterClassMethods.
-
getAfterTestMethods
public ITestNGMethod[] getAfterTestMethods()
Description copied from interface:ITestClassReturns all the methods that should be invoked after a test method completes.- Specified by:
getAfterTestMethodsin interfaceITestClass- Returns:
- Returns the afterTestMethods.
-
getBeforeClassMethods
public ITestNGMethod[] getBeforeClassMethods()
Description copied from interface:ITestClassReturn 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:
getBeforeClassMethodsin interfaceITestClass- Returns:
- Returns the beforeClassMethods.
-
getBeforeTestMethods
public ITestNGMethod[] getBeforeTestMethods()
Description copied from interface:ITestClassReturns all the methods that should be invoked before a test method is invoked.- Specified by:
getBeforeTestMethodsin interfaceITestClass- Returns:
- Returns the beforeTestMethods.
-
getTestMethods
public ITestNGMethod[] getTestMethods()
Description copied from interface:ITestClassReturns all the applicable test methods.- Specified by:
getTestMethodsin interfaceITestClass- Returns:
- Returns the testMethods.
-
getBeforeSuiteMethods
public ITestNGMethod[] getBeforeSuiteMethods()
Description copied from interface:ITestClassReturns All the methods that should be invoked before the suite is run.- Specified by:
getBeforeSuiteMethodsin interfaceITestClass- Returns:
- All the methods that should be invoked before the suite is run.
-
getAfterSuiteMethods
public ITestNGMethod[] getAfterSuiteMethods()
Description copied from interface:ITestClassReturns all the methods that should be invoked after the suite has run.- Specified by:
getAfterSuiteMethodsin interfaceITestClass- Returns:
- All the methods that should be invoked after the suite has run.
-
getBeforeTestConfigurationMethods
public ITestNGMethod[] getBeforeTestConfigurationMethods()
Description copied from interface:ITestClassReturns all @Configuration methods that should be invoked before any others in the current test.- Specified by:
getBeforeTestConfigurationMethodsin interfaceITestClass- Returns:
- all @Configuration methods that should be invoked before any others in the current test.
-
getAfterTestConfigurationMethods
public ITestNGMethod[] getAfterTestConfigurationMethods()
Description copied from interface:ITestClassReturns all @Configuration methods that should be invoked last before any others in the current test.- Specified by:
getAfterTestConfigurationMethodsin 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:ITestClassReturns all @Configuration methods that should be invoked before certain groups.- Specified by:
getBeforeGroupsMethodsin interfaceITestClass- Returns:
- all @Configuration methods that should be invoked before certain groups
-
getAfterGroupsMethods
public ITestNGMethod[] getAfterGroupsMethods()
Description copied from interface:ITestClassReturns all @Configuration methods that should be invoked after certain groups.- Specified by:
getAfterGroupsMethodsin interfaceITestClass- Returns:
- all @Configuration methods that should be invoked after certain groups
-
getInstanceCount
@Deprecated public int getInstanceCount()
Deprecated.- Specified by:
getInstanceCountin interfaceIClass- 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
public long[] getInstanceHashCodes()
- Specified by:
getInstanceHashCodesin interfaceIClass- See Also:
IClass.getInstanceHashCodes()
-
getInstances
public java.lang.Object[] getInstances(boolean reuse)
Description copied from interface:IClassReturns 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:
getInstancesin interfaceIClass- Parameters:
reuse- flag if a new set of instances must be returned (if set to false)- Returns:
- All the instances the methods will be invoked upon.
- See Also:
IClass.getInstances(boolean)
-
getName
public java.lang.String getName()
-
getRealClass
public java.lang.Class getRealClass()
- Specified by:
getRealClassin interfaceIClass- Returns:
- the Java class corresponding to this IClass.
-
addInstance
public void addInstance(java.lang.Object instance)
- Specified by:
addInstancein interfaceIClass- See Also:
IClass.addInstance(java.lang.Object)
-
setTestClass
public void setTestClass(java.lang.Class<?> declaringClass)
-
getTestName
public java.lang.String getTestName()
Description copied from interface:IClassIf this class implements org.testng.ITest, returns its test name, otherwise returns null.- Specified by:
getTestNamein interfaceIClass
-
getXmlTest
public XmlTest getXmlTest()
- Specified by:
getXmlTestin interfaceIClass- Returns:
- the <test> tag this class was found in.
-
getXmlClass
public XmlClass getXmlClass()
- Specified by:
getXmlClassin interfaceIClass- Returns:
- the *lt;class> tag this class was found in.
-
-