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
-
-
Constructor Summary
Constructors Constructor Description ConfigurationAnnotation()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String[]getAfterGroups()booleangetAfterSuite()booleangetAfterTest()booleangetAfterTestClass()booleangetAfterTestMethod()booleangetAlwaysRun()Used only for after type of configuration methods.java.lang.String[]getBeforeGroups()booleangetBeforeSuite()booleangetBeforeTest()booleangetBeforeTestClass()booleangetBeforeTestMethod()java.lang.String[]getGroupFilters()booleangetInheritGroups()booleanisAfterGroups()booleanisBeforeGroups()booleanisFakeConfiguration()Internal use only.booleanisFirstTimeOnly()booleanisIgnoreFailure()booleanisLastTimeOnly()voidsetAfterGroups(java.lang.String[] afterGroups)voidsetAfterSuite(boolean afterSuite)voidsetAfterTest(boolean afterTest)voidsetAfterTestClass(boolean afterTestClass)voidsetAfterTestMethod(boolean afterTestMethod)voidsetAlwaysRun(boolean alwaysRun)voidsetBeforeGroups(java.lang.String[] beforeGroups)voidsetBeforeSuite(boolean beforeSuite)voidsetBeforeTest(boolean beforeTest)voidsetBeforeTestClass(boolean beforeTestClass)voidsetBeforeTestMethod(boolean beforeTestMethod)voidsetFakeConfiguration(boolean b)voidsetFirstTimeOnly(boolean f)voidsetIgnoreFailure(boolean ignoreFailure)voidsetInheritGroups(boolean inheritGroups)voidsetIsAfterGroups(boolean isAfterGroups)voidsetIsBeforeGroups(boolean isBeforeGroups)voidsetLastTimeOnly(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
-
-
-
-
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:
isBeforeGroupsin interfaceIConfigurationAnnotation
-
isAfterGroups
public boolean isAfterGroups()
- Specified by:
isAfterGroupsin interfaceIConfigurationAnnotation
-
getBeforeTestClass
public boolean getBeforeTestClass()
- Specified by:
getBeforeTestClassin 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:
getAfterTestClassin 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:
getBeforeTestMethodin interfaceIConfigurationAnnotation- Returns:
- true true if the annotated method will be run before any test method is invoked.
-
getAfterTestMethod
public boolean getAfterTestMethod()
- Specified by:
getAfterTestMethodin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after any test method is invoked.
-
getBeforeSuite
public boolean getBeforeSuite()
- Specified by:
getBeforeSuitein interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run before this suite starts.
-
getAfterSuite
public boolean getAfterSuite()
- Specified by:
getAfterSuitein interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after all tests in this suite have run.
-
getBeforeTest
public boolean getBeforeTest()
- Specified by:
getBeforeTestin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run before every test
-
getAfterTest
public boolean getAfterTest()
- Specified by:
getAfterTestin interfaceIConfigurationAnnotation- Returns:
- true if the annotated method will be run after all every test.
-
getAlwaysRun
public boolean getAlwaysRun()
Description copied from interface:IConfigurationAnnotationUsed only for after type of configuration methods.- Specified by:
getAlwaysRunin interfaceIBaseBeforeAfter- Specified by:
getAlwaysRunin interfaceIConfigurationAnnotation- Returns:
- true if the configuration method will be run whatever the status of before configuration methods was.
-
getInheritGroups
public boolean getInheritGroups()
- Specified by:
getInheritGroupsin interfaceIBaseBeforeAfter- Specified by:
getInheritGroupsin 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:
getAfterGroupsin 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:
getBeforeGroupsin 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:
getGroupFiltersin interfaceIBaseBeforeAfterMethod- Returns:
- The list of groups the test method must belong to one of which.
-
setFakeConfiguration
public void setFakeConfiguration(boolean b)
-
isFakeConfiguration
public boolean isFakeConfiguration()
Description copied from interface:IConfigurationAnnotationInternal use only.- Specified by:
isFakeConfigurationin 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:
isIgnoreFailurein interfaceIConfigurationAnnotation
-
setIgnoreFailure
public void setIgnoreFailure(boolean ignoreFailure)
-
-