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
FieldsModifier and TypeFieldDescriptionprivate String[]
private boolean
private boolean
private boolean
private boolean
private boolean
private String[]
private boolean
private boolean
private boolean
private boolean
private boolean
private String[]
private boolean
private boolean
private boolean
private boolean
private boolean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionString[]
boolean
boolean
boolean
boolean
boolean
Used only for after type of configuration methods.String[]
boolean
boolean
boolean
boolean
String[]
boolean
boolean
boolean
boolean
Internal use only.boolean
boolean
void
setAfterGroups
(String[] afterGroups) void
setAfterSuite
(boolean afterSuite) void
setAfterTest
(boolean afterTest) void
setAfterTestClass
(boolean afterTestClass) void
setAfterTestMethod
(boolean afterTestMethod) void
setAlwaysRun
(boolean alwaysRun) void
setBeforeGroups
(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
(String[] groupFilters) 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
Methods inherited from interface org.testng.annotations.IParameterizable
setEnabled
Methods inherited from interface org.testng.annotations.ITestOrConfiguration
getTimeOut, setDependsOnGroups, setDependsOnMethods, setDescription, setGroups, setTimeOut
-
Field Details
-
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
-
m_afterGroups
-
m_groupFilters
-
m_isFakeConfiguration
private boolean m_isFakeConfiguration -
m_firstTimeOnly
private boolean m_firstTimeOnly -
m_lastTimeOnly
private boolean m_lastTimeOnly
-
-
Constructor Details
-
ConfigurationAnnotation
public ConfigurationAnnotation()
-
-
Method Details
-
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
- Specified by:
getAfterGroups
in interfaceIConfigurationAnnotation
- Returns:
- The list of groups that this configuration method will run after.
-
setAfterGroups
-
getBeforeGroups
- Specified by:
getBeforeGroups
in interfaceIConfigurationAnnotation
- Returns:
- The list of groups that this configuration method will run before.
-
setBeforeGroups
-
getGroupFilters
- Specified by:
getGroupFilters
in interfaceIBaseBeforeAfterMethod
- Returns:
- The list of groups the test method must belong to one of which.
-
setGroupFilters
-
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()
-