Package org.testng.internal.annotations
Class ConfigurationAnnotation
- java.lang.Object
-
- org.testng.internal.annotations.BaseAnnotation
-
- org.testng.internal.annotations.TestOrConfiguration
-
- org.testng.internal.annotations.ConfigurationAnnotation
-
- All Implemented Interfaces:
IAnnotation
,IConfigurationAnnotation
,IParameterizable
,ITestOrConfiguration
,IAfterClass
,IAfterGroups
,IAfterMethod
,IAfterSuite
,IAfterTest
,IBaseBeforeAfter
,IBaseBeforeAfterMethod
,IBeforeClass
,IBeforeGroups
,IBeforeMethod
,IBeforeSuite
,IBeforeTest
public class ConfigurationAnnotation extends TestOrConfiguration implements IConfigurationAnnotation, IBeforeSuite, IAfterSuite, IBeforeTest, IAfterTest, IBeforeGroups, IAfterGroups, IBeforeClass, IAfterClass, IBeforeMethod, IAfterMethod
An implementation of IConfiguration
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String[]
m_afterGroups
private boolean
m_afterSuite
private boolean
m_afterTest
private boolean
m_afterTestClass
private boolean
m_afterTestMethod
private boolean
m_alwaysRun
private java.lang.String[]
m_beforeGroups
private boolean
m_beforeSuite
private boolean
m_beforeTest
private boolean
m_beforeTestClass
private boolean
m_beforeTestMethod
private boolean
m_firstTimeOnly
private java.lang.String[]
m_groupFilters
private boolean
m_ignoreFailure
private boolean
m_inheritGroups
private boolean
m_isAfterGroups
private boolean
m_isBeforeGroups
private boolean
m_isFakeConfiguration
private boolean
m_lastTimeOnly
-
Constructor Summary
Constructors Constructor Description ConfigurationAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]
getAfterGroups()
boolean
getAfterSuite()
boolean
getAfterTest()
boolean
getAfterTestClass()
boolean
getAfterTestMethod()
boolean
getAlwaysRun()
Used only for after type of configuration methods.java.lang.String[]
getBeforeGroups()
boolean
getBeforeSuite()
boolean
getBeforeTest()
boolean
getBeforeTestClass()
boolean
getBeforeTestMethod()
java.lang.String[]
getGroupFilters()
boolean
getInheritGroups()
boolean
isAfterGroups()
boolean
isBeforeGroups()
boolean
isFakeConfiguration()
Internal use only.boolean
isFirstTimeOnly()
boolean
isIgnoreFailure()
boolean
isLastTimeOnly()
void
setAfterGroups(java.lang.String[] afterGroups)
void
setAfterSuite(boolean afterSuite)
void
setAfterTest(boolean afterTest)
void
setAfterTestClass(boolean afterTestClass)
void
setAfterTestMethod(boolean afterTestMethod)
void
setAlwaysRun(boolean alwaysRun)
void
setBeforeGroups(java.lang.String[] beforeGroups)
void
setBeforeSuite(boolean beforeSuite)
void
setBeforeTest(boolean beforeTest)
void
setBeforeTestClass(boolean beforeTestClass)
void
setBeforeTestMethod(boolean beforeTestMethod)
void
setFakeConfiguration(boolean b)
void
setFirstTimeOnly(boolean f)
(package private) void
setGroupFilters(java.lang.String[] groupFilters)
void
setIgnoreFailure(boolean ignoreFailure)
void
setInheritGroups(boolean inheritGroups)
void
setIsAfterGroups(boolean isAfterGroups)
void
setIsBeforeGroups(boolean isBeforeGroups)
void
setLastTimeOnly(boolean f)
-
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, getPriority, getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setEnabled, setGroups, setPriority, setTimeOut
-
Methods inherited from class org.testng.internal.annotations.BaseAnnotation
getConstructor, getMethod, getTestClass, setConstructor, setMethod, setTestClass
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.testng.internal.annotations.IBaseBeforeAfter
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, ignoreFailure
-
Methods inherited from interface org.testng.annotations.IParameterizable
setEnabled
-
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
-
-
-
Field Detail
-
m_beforeTestClass
private boolean m_beforeTestClass
-
m_afterTestClass
private boolean m_afterTestClass
-
m_beforeTestMethod
private boolean m_beforeTestMethod
-
m_afterTestMethod
private boolean m_afterTestMethod
-
m_beforeTest
private boolean m_beforeTest
-
m_afterTest
private boolean m_afterTest
-
m_beforeSuite
private boolean m_beforeSuite
-
m_afterSuite
private boolean m_afterSuite
-
m_alwaysRun
private boolean m_alwaysRun
-
m_inheritGroups
private boolean m_inheritGroups
-
m_isBeforeGroups
private boolean m_isBeforeGroups
-
m_isAfterGroups
private boolean m_isAfterGroups
-
m_beforeGroups
private java.lang.String[] m_beforeGroups
-
m_afterGroups
private java.lang.String[] m_afterGroups
-
m_groupFilters
private java.lang.String[] m_groupFilters
-
m_isFakeConfiguration
private boolean m_isFakeConfiguration
-
m_firstTimeOnly
private boolean m_firstTimeOnly
-
m_lastTimeOnly
private boolean m_lastTimeOnly
-
m_ignoreFailure
private boolean m_ignoreFailure
-
-
Method Detail
-
setAfterSuite
public void setAfterSuite(boolean afterSuite)
-
setAfterTest
public void setAfterTest(boolean afterTest)
-
setAfterTestClass
public void setAfterTestClass(boolean afterTestClass)
-
setAfterTestMethod
public void setAfterTestMethod(boolean afterTestMethod)
-
setAlwaysRun
public void setAlwaysRun(boolean alwaysRun)
-
setBeforeSuite
public void setBeforeSuite(boolean beforeSuite)
-
setBeforeTest
public void setBeforeTest(boolean beforeTest)
-
setBeforeTestClass
public void setBeforeTestClass(boolean beforeTestClass)
-
setBeforeTestMethod
public void setBeforeTestMethod(boolean beforeTestMethod)
-
setInheritGroups
public void setInheritGroups(boolean inheritGroups)
-
setIsBeforeGroups
public void setIsBeforeGroups(boolean isBeforeGroups)
-
setIsAfterGroups
public void setIsAfterGroups(boolean isAfterGroups)
-
isBeforeGroups
public boolean isBeforeGroups()
- Specified by:
isBeforeGroups
in interfaceIConfigurationAnnotation
-
isAfterGroups
public boolean isAfterGroups()
- Specified by:
isAfterGroups
in interfaceIConfigurationAnnotation
-
getBeforeTestClass
public boolean getBeforeTestClass()
- Specified by:
getBeforeTestClass
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run after the test class is instantiated and before the test method is invoked.
-
getAfterTestClass
public boolean getAfterTestClass()
- Specified by:
getAfterTestClass
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run after all the tests in the test class have been run.
-
getBeforeTestMethod
public boolean getBeforeTestMethod()
- Specified by:
getBeforeTestMethod
in interfaceIConfigurationAnnotation
- Returns:
- true true if the annotated method will be run before any test method is invoked.
-
getAfterTestMethod
public boolean getAfterTestMethod()
- Specified by:
getAfterTestMethod
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run after any test method is invoked.
-
getBeforeSuite
public boolean getBeforeSuite()
- Specified by:
getBeforeSuite
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run before this suite starts.
-
getAfterSuite
public boolean getAfterSuite()
- Specified by:
getAfterSuite
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run after all tests in this suite have run.
-
getBeforeTest
public boolean getBeforeTest()
- Specified by:
getBeforeTest
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run before every test
-
getAfterTest
public boolean getAfterTest()
- Specified by:
getAfterTest
in interfaceIConfigurationAnnotation
- Returns:
- true if the annotated method will be run after all every test.
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:IConfigurationAnnotation
Used only for after type of configuration methods.- Specified by:
getAlwaysRun
in interfaceIBaseBeforeAfter
- Specified by:
getAlwaysRun
in interfaceIConfigurationAnnotation
- Returns:
- true if the configuration method will be run whatever the status of before configuration methods was.
-
getInheritGroups
public boolean getInheritGroups()
- Specified by:
getInheritGroups
in interfaceIBaseBeforeAfter
- Specified by:
getInheritGroups
in interfaceIConfigurationAnnotation
- Returns:
- true if this @Configuration method will belong to groups specified in the \@Test annotation on the class (if any).
-
getAfterGroups
public java.lang.String[] getAfterGroups()
- Specified by:
getAfterGroups
in interfaceIConfigurationAnnotation
- Returns:
- The list of groups that this configuration method will run after.
-
setAfterGroups
public void setAfterGroups(java.lang.String[] afterGroups)
-
getBeforeGroups
public java.lang.String[] getBeforeGroups()
- Specified by:
getBeforeGroups
in interfaceIConfigurationAnnotation
- Returns:
- The list of groups that this configuration method will run before.
-
setBeforeGroups
public void setBeforeGroups(java.lang.String[] beforeGroups)
-
getGroupFilters
public java.lang.String[] getGroupFilters()
- Specified by:
getGroupFilters
in interfaceIBaseBeforeAfterMethod
- Returns:
- The list of groups the test method must belong to one of which.
-
setGroupFilters
void setGroupFilters(java.lang.String[] groupFilters)
-
setFakeConfiguration
public void setFakeConfiguration(boolean b)
-
isFakeConfiguration
public boolean isFakeConfiguration()
Description copied from interface:IConfigurationAnnotation
Internal use only.- Specified by:
isFakeConfiguration
in interfaceIConfigurationAnnotation
- Returns:
- true if this configuration annotation is not a "true" configuration annotation but a @BeforeSuite or similar that is represented as a configuration annotation.
-
setFirstTimeOnly
public void setFirstTimeOnly(boolean f)
-
isFirstTimeOnly
public boolean isFirstTimeOnly()
-
setLastTimeOnly
public void setLastTimeOnly(boolean f)
-
isLastTimeOnly
public boolean isLastTimeOnly()
-
isIgnoreFailure
public boolean isIgnoreFailure()
- Specified by:
isIgnoreFailure
in interfaceIConfigurationAnnotation
-
setIgnoreFailure
public void setIgnoreFailure(boolean ignoreFailure)
-
-