org.testng.internal.annotations
Class ConfigurationAnnotation

java.lang.Object
  extended by org.testng.internal.annotations.BaseAnnotation
      extended by org.testng.internal.annotations.TestOrConfiguration
          extended by org.testng.internal.annotations.ConfigurationAnnotation
All Implemented Interfaces:
IAnnotation, IConfiguration, IParameterizable, ITestOrConfiguration

public class ConfigurationAnnotation
extends TestOrConfiguration
implements IConfiguration

An implementation of IConfiguration Created on Dec 16, 2005

Author:
cbeust

Constructor Summary
ConfigurationAnnotation()
           
 
Method Summary
 java.lang.String[] getAfterGroups()
          The list of groups that this configuration method will run after.
 boolean getAfterSuite()
          If true, the annotated method will be run after all tests in this suite have run.
 boolean getAfterTest()
          If true, the annotated method will be run after all every test.
 boolean getAfterTestClass()
          If true, the annotated method will be run after all the tests in the test class have been run.
 boolean getAfterTestMethod()
          If true, the annotated method will be run after any test method is invoked.
 boolean getAlwaysRun()
          Used only for after type of configuration methods.
 java.lang.String[] getBeforeGroups()
          The list of groups that this configuration method will run before.
 boolean getBeforeSuite()
          If true, the annotated method will be run before this suite starts.
 boolean getBeforeTest()
          If true, the annotated method will be run before every test
 boolean getBeforeTestClass()
          If true, the annotated method will be run after the test class is instantiated and before the test method is invoked.
 boolean getBeforeTestMethod()
          If true, the annotated method will be run before any test method is invoked.
 boolean getInheritGroups()
          If true, this @Configuration method will belong to groups specified in the
 java.lang.String[] getParameters()
          The list of variables used to fill the parameters of this method.
 boolean isFakeConfiguration()
          Internal use only.
 boolean isFirstTimeOnly()
           
 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)
           
 void setInheritGroups(boolean inheritGroups)
           
 void setLastTimeOnly(boolean f)
           
 void setParameters(java.lang.String[] parameters)
           
 
Methods inherited from class org.testng.internal.annotations.TestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, setDependsOnGroups, setDependsOnMethods, setDescription, setEnabled, setGroups
 
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.ITestOrConfiguration
getDependsOnGroups, getDependsOnMethods, getDescription, getEnabled, getGroups, setDependsOnGroups, setDependsOnMethods, setGroups
 

Constructor Detail

ConfigurationAnnotation

public ConfigurationAnnotation()
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)

setParameters

public void setParameters(java.lang.String[] parameters)
Overrides:
setParameters in class TestOrConfiguration

getBeforeTestClass

public boolean getBeforeTestClass()
Description copied from interface: IConfiguration
If true, the annotated method will be run after the test class is instantiated and before the test method is invoked.

Specified by:
getBeforeTestClass in interface IConfiguration

getAfterTestClass

public boolean getAfterTestClass()
Description copied from interface: IConfiguration
If true, the annotated method will be run after all the tests in the test class have been run.

Specified by:
getAfterTestClass in interface IConfiguration

getBeforeTestMethod

public boolean getBeforeTestMethod()
Description copied from interface: IConfiguration
If true, the annotated method will be run before any test method is invoked.

Specified by:
getBeforeTestMethod in interface IConfiguration

getAfterTestMethod

public boolean getAfterTestMethod()
Description copied from interface: IConfiguration
If true, the annotated method will be run after any test method is invoked.

Specified by:
getAfterTestMethod in interface IConfiguration

getBeforeSuite

public boolean getBeforeSuite()
Description copied from interface: IConfiguration
If true, the annotated method will be run before this suite starts.

Specified by:
getBeforeSuite in interface IConfiguration

getAfterSuite

public boolean getAfterSuite()
Description copied from interface: IConfiguration
If true, the annotated method will be run after all tests in this suite have run.

Specified by:
getAfterSuite in interface IConfiguration

getBeforeTest

public boolean getBeforeTest()
Description copied from interface: IConfiguration
If true, the annotated method will be run before every test

Specified by:
getBeforeTest in interface IConfiguration

getAfterTest

public boolean getAfterTest()
Description copied from interface: IConfiguration
If true, the annotated method will be run after all every test.

Specified by:
getAfterTest in interface IConfiguration

getParameters

public java.lang.String[] getParameters()
Description copied from interface: IParameterizable
The list of variables used to fill the parameters of this method. These variables must be defined in the property file.

Specified by:
getParameters in interface IParameterizable
Overrides:
getParameters in class TestOrConfiguration

getAlwaysRun

public boolean getAlwaysRun()
Description copied from interface: IConfiguration
Used only for after type of configuration methods. If set to true than the configuration method will be run whatever the status of before configuration methods was.

Specified by:
getAlwaysRun in interface IConfiguration

getInheritGroups

public boolean getInheritGroups()
Description copied from interface: IConfiguration
If true, this @Configuration method will belong to groups specified in the

Specified by:
getInheritGroups in interface IConfiguration

getAfterGroups

public java.lang.String[] getAfterGroups()
Description copied from interface: IConfiguration
The list of groups that this configuration method will run after.

Specified by:
getAfterGroups in interface IConfiguration

setAfterGroups

public void setAfterGroups(java.lang.String[] afterGroups)

getBeforeGroups

public java.lang.String[] getBeforeGroups()
Description copied from interface: IConfiguration
The list of groups that this configuration method will run before.

Specified by:
getBeforeGroups in interface IConfiguration

setBeforeGroups

public void setBeforeGroups(java.lang.String[] beforeGroups)

setFakeConfiguration

public void setFakeConfiguration(boolean b)

isFakeConfiguration

public boolean isFakeConfiguration()
Description copied from interface: IConfiguration
Internal use only.

Specified by:
isFakeConfiguration in interface IConfiguration
Returns:
true if this configuration annotation is not a "true" @Configuration but a @BeforeSuite or similar that is represented as a @Configuration

setFirstTimeOnly

public void setFirstTimeOnly(boolean f)

isFirstTimeOnly

public boolean isFirstTimeOnly()

setLastTimeOnly

public void setLastTimeOnly(boolean f)

isLastTimeOnly

public boolean isLastTimeOnly()


Copyright © 2010. All Rights Reserved.