Package org.testng.internal
Class ConfigurationMethod
- java.lang.Object
-
- org.testng.internal.BaseTestMethod
-
- org.testng.internal.ConfigurationMethod
-
- All Implemented Interfaces:
java.lang.Cloneable
,ITestNGMethod
public class ConfigurationMethod extends BaseTestMethod
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
m_inheritGroupsFromTestClass
private boolean
m_isAfterClassConfiguration
private boolean
m_isAfterMethodConfiguration
private boolean
m_isAfterSuiteConfiguration
private boolean
m_isAfterTestConfiguration
private boolean
m_isBeforeClassConfiguration
private boolean
m_isBeforeMethodConfiguration
private boolean
m_isBeforeSuiteConfiguration
private boolean
m_isBeforeTestConfiguration
-
Fields inherited from class org.testng.internal.BaseTestMethod
DATE_COMPARATOR, m_afterGroups, m_annotationFinder, m_beforeGroups, m_currentInvocationCount, m_date, m_groups, m_groupsDependedUpon, m_id, m_method, m_methodClass, m_methodsDependedUpon, m_testClass
-
-
Constructor Summary
Constructors Modifier Constructor Description ConfigurationMethod(java.lang.reflect.Method method, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
Deprecated.use #ConfigurationMethod(ConstructorOrMethod,...) instead.private
ConfigurationMethod(ConstructorOrMethod com, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, boolean initialize, java.lang.Object instance)
ConfigurationMethod(ConstructorOrMethod com, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description ConfigurationMethod
clone()
static ITestNGMethod[]
createAfterConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
static ITestNGMethod[]
createBeforeConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
static ITestNGMethod[]
createClassConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
private static ITestNGMethod[]
createMethods(ITestNGMethod[] methods, IAnnotationFinder finder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
static ITestNGMethod[]
createSuiteConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
static ITestNGMethod[]
createTestConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
static ITestNGMethod[]
createTestMethodConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
private boolean
inheritGroupsFromTestClass()
private void
init()
boolean
isAfterClassConfiguration()
boolean
isAfterGroupsConfiguration()
boolean
isAfterMethodConfiguration()
boolean
isAfterSuiteConfiguration()
boolean
isAfterTestConfiguration()
boolean
isBeforeClassConfiguration()
boolean
isBeforeGroupsConfiguration()
boolean
isBeforeMethodConfiguration()
boolean
isBeforeSuiteConfiguration()
boolean
isBeforeTestConfiguration()
boolean
isFirstTimeOnly()
boolean
isLastTimeOnly()
private static void
ppp(java.lang.String s)
-
Methods inherited from class org.testng.internal.BaseTestMethod
addFailedInvocationNumber, addMethodDependedUpon, canRunFromClass, equals, findMethodParameters, getAfterGroups, getAnnotationFinder, getBeforeGroups, getConstructorOrMethod, getCurrentInvocationCount, getDate, getDescription, getEnabled, getFailedInvocationNumbers, getGroups, getGroupsDependedUpon, getIClass, getId, getInstance, getInstanceHashCodes, getInstances, getInvocationCount, getInvocationNumbers, getInvocationTimeOut, getMethod, getMethodName, getMethodsDependedUpon, getMissingGroup, getParameterInvocationCount, getPriority, getQualifiedName, getRealClass, getRetryAnalyzer, getSignature, getSimpleName, getStringArray, getSuccessPercentage, getTestClass, getThreadPoolSize, getTimeOut, getTotalInvocationCount, getXmlTest, hashCode, hasMoreInvocation, ignoreMissingDependencies, incrementCurrentInvocationCount, initBeforeAfterGroups, initGroups, isAlwaysRun, isTest, setAlwaysRun, setDate, setDescription, setEnabled, setGroups, setGroupsDependedUpon, setId, setIgnoreMissingDependencies, setInvocationCount, setInvocationNumbers, setInvocationTimeOut, setMethodsDependedUpon, setMissingGroup, setMoreInvocationChecker, setParameterInvocationCount, setPriority, setRetryAnalyzer, setSkipFailedInvocations, setTestClass, setThreadPoolSize, setTimeOut, setXmlTest, skipFailedInvocations, toString
-
-
-
-
Field Detail
-
m_isBeforeSuiteConfiguration
private final boolean m_isBeforeSuiteConfiguration
-
m_isAfterSuiteConfiguration
private final boolean m_isAfterSuiteConfiguration
-
m_isBeforeTestConfiguration
private final boolean m_isBeforeTestConfiguration
-
m_isAfterTestConfiguration
private final boolean m_isAfterTestConfiguration
-
m_isBeforeClassConfiguration
private final boolean m_isBeforeClassConfiguration
-
m_isAfterClassConfiguration
private final boolean m_isAfterClassConfiguration
-
m_isBeforeMethodConfiguration
private final boolean m_isBeforeMethodConfiguration
-
m_isAfterMethodConfiguration
private final boolean m_isAfterMethodConfiguration
-
m_inheritGroupsFromTestClass
private boolean m_inheritGroupsFromTestClass
-
-
Constructor Detail
-
ConfigurationMethod
private ConfigurationMethod(ConstructorOrMethod com, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, boolean initialize, java.lang.Object instance)
-
ConfigurationMethod
@Deprecated public ConfigurationMethod(java.lang.reflect.Method method, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
Deprecated.use #ConfigurationMethod(ConstructorOrMethod,...) instead.
-
ConfigurationMethod
public ConfigurationMethod(ConstructorOrMethod com, IAnnotationFinder annotationFinder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
-
-
Method Detail
-
createMethods
private static ITestNGMethod[] createMethods(ITestNGMethod[] methods, IAnnotationFinder finder, boolean isBeforeSuite, boolean isAfterSuite, boolean isBeforeTest, boolean isAfterTest, boolean isBeforeClass, boolean isAfterClass, boolean isBeforeMethod, boolean isAfterMethod, java.lang.String[] beforeGroups, java.lang.String[] afterGroups, java.lang.Object instance)
-
createSuiteConfigurationMethods
public static ITestNGMethod[] createSuiteConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
createTestConfigurationMethods
public static ITestNGMethod[] createTestConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
createClassConfigurationMethods
public static ITestNGMethod[] createClassConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
createBeforeConfigurationMethods
public static ITestNGMethod[] createBeforeConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
createAfterConfigurationMethods
public static ITestNGMethod[] createAfterConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
createTestMethodConfigurationMethods
public static ITestNGMethod[] createTestMethodConfigurationMethods(ITestNGMethod[] methods, IAnnotationFinder annotationFinder, boolean isBefore, java.lang.Object instance)
-
isAfterClassConfiguration
public boolean isAfterClassConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isAfterClassConfiguration
in interfaceITestNGMethod
- Overrides:
isAfterClassConfiguration
in classBaseTestMethod
- Returns:
- Returns the isAfterClassConfiguration.
-
isAfterMethodConfiguration
public boolean isAfterMethodConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isAfterMethodConfiguration
in interfaceITestNGMethod
- Overrides:
isAfterMethodConfiguration
in classBaseTestMethod
- Returns:
- Returns the isAfterMethodConfiguration.
-
isBeforeClassConfiguration
public boolean isBeforeClassConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isBeforeClassConfiguration
in interfaceITestNGMethod
- Overrides:
isBeforeClassConfiguration
in classBaseTestMethod
- Returns:
- Returns the isBeforeClassConfiguration.
-
isBeforeMethodConfiguration
public boolean isBeforeMethodConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isBeforeMethodConfiguration
in interfaceITestNGMethod
- Overrides:
isBeforeMethodConfiguration
in classBaseTestMethod
- Returns:
- Returns the isBeforeMethodConfiguration.
-
isAfterSuiteConfiguration
public boolean isAfterSuiteConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isAfterSuiteConfiguration
in interfaceITestNGMethod
- Overrides:
isAfterSuiteConfiguration
in classBaseTestMethod
- Returns:
- Returns the isAfterSuiteConfiguration.
-
isBeforeSuiteConfiguration
public boolean isBeforeSuiteConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isBeforeSuiteConfiguration
in interfaceITestNGMethod
- Overrides:
isBeforeSuiteConfiguration
in classBaseTestMethod
- Returns:
- Returns the isBeforeSuiteConfiguration.
-
isBeforeTestConfiguration
public boolean isBeforeTestConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isBeforeTestConfiguration
in interfaceITestNGMethod
- Overrides:
isBeforeTestConfiguration
in classBaseTestMethod
- Returns:
- true if this method is a @BeforeTest (@Configuration beforeTest=true)
-
isAfterTestConfiguration
public boolean isAfterTestConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isAfterTestConfiguration
in interfaceITestNGMethod
- Overrides:
isAfterTestConfiguration
in classBaseTestMethod
- Returns:
- true if this method is an @AfterTest (@Configuration afterTest=true)
-
isBeforeGroupsConfiguration
public boolean isBeforeGroupsConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isBeforeGroupsConfiguration
in interfaceITestNGMethod
- Overrides:
isBeforeGroupsConfiguration
in classBaseTestMethod
-
isAfterGroupsConfiguration
public boolean isAfterGroupsConfiguration()
Description copied from class:BaseTestMethod
- Specified by:
isAfterGroupsConfiguration
in interfaceITestNGMethod
- Overrides:
isAfterGroupsConfiguration
in classBaseTestMethod
-
inheritGroupsFromTestClass
private boolean inheritGroupsFromTestClass()
-
init
private void init()
-
ppp
private static void ppp(java.lang.String s)
-
clone
public ConfigurationMethod clone()
- Specified by:
clone
in interfaceITestNGMethod
- Specified by:
clone
in classBaseTestMethod
-
isFirstTimeOnly
public boolean isFirstTimeOnly()
-
isLastTimeOnly
public boolean isLastTimeOnly()
-
-