Enum RefreshEachTimeBefore
- java.lang.Object
-
- java.lang.Enum<RefreshEachTimeBefore>
-
- ru.tinkoff.qa.neptune.testng.integration.properties.RefreshEachTimeBefore
-
- All Implemented Interfaces:
Serializable
,Comparable<RefreshEachTimeBefore>
,Supplier<Class<? extends Annotation>>
public enum RefreshEachTimeBefore extends Enum<RefreshEachTimeBefore> implements Supplier<Class<? extends Annotation>>
This enum is designed to define the strategy of the invoking ofContextRefreshable.refreshContext()
by engines of TestNg. It is supposed to be invoked before methods annotated byBeforeSuite
and/orBeforeTest
and/orBeforeClass
and/orBeforeGroups
and/orBeforeMethod
and/orTest
.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BEFORE_METHOD_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first method annotated byBeforeMethod
is run before any test.CLASS_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the firstBeforeClass
- method of a class is run.GROUP_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the firstBeforeGroups
- method of a group is run.METHOD_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before any method annotated byTest
is run.SUITE_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first method annotated byBeforeSuite
is run.TEST_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first annotated byBeforeTest
is run.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Class<? extends Annotation>
get()
static RefreshEachTimeBefore
valueOf(String name)
Returns the enum constant of this type with the specified name.static RefreshEachTimeBefore[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
SUITE_STARTING
public static final RefreshEachTimeBefore SUITE_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first method annotated byBeforeSuite
is run.
-
TEST_STARTING
public static final RefreshEachTimeBefore TEST_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first annotated byBeforeTest
is run. Rule:ContextRefreshable.refreshContext()
is invoked when: 1.ContextRefreshable.refreshContext()
has not been invoked before anyBeforeSuite
/BeforeTest
-method.
-
CLASS_STARTING
public static final RefreshEachTimeBefore CLASS_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the firstBeforeClass
- method of a class is run. Rule:ContextRefreshable.refreshContext()
is invoked when: 1.ContextRefreshable.refreshContext()
has not been invoked before someBeforeSuite
/BeforeTest
/BeforeClass
-method and anyTest
-method has not been invoked yet. 2.ContextRefreshable.refreshContext()
has not been invoked before someBeforeClass
-method and anyTest
-method has not been invoked yet.
-
GROUP_STARTING
public static final RefreshEachTimeBefore GROUP_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the firstBeforeGroups
- method of a group is run.
-
BEFORE_METHOD_STARTING
public static final RefreshEachTimeBefore BEFORE_METHOD_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before the first method annotated byBeforeMethod
is run before any test. Rule:ContextRefreshable.refreshContext()
is invoked when: 1.ContextRefreshable.refreshContext()
has not been invoked before someBeforeSuite
/BeforeTest
/BeforeClass
/BeforeGroups
/BeforeMethod
-method and anyTest
-method has not been invoked yet. 2.ContextRefreshable.refreshContext()
has not been invoked before someBeforeMethod
-method and anyTest
-method has not been invoked yet.
-
METHOD_STARTING
public static final RefreshEachTimeBefore METHOD_STARTING
This element is used to define the strategy to invoke theContextRefreshable.refreshContext()
each time before any method annotated byTest
is run. Rule:ContextRefreshable.refreshContext()
is invoked when: 1.ContextRefreshable.refreshContext()
has not been invoked before someBeforeSuite
/BeforeTest
/BeforeClass
/BeforeGroups
/BeforeMethod
-method and anyTest
-method has not been invoked yet. 2.ContextRefreshable.refreshContext()
has not been invoked before someBeforeMethod
-method and anyTest
-method has not been invoked yet.
-
-
Method Detail
-
values
public static RefreshEachTimeBefore[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (RefreshEachTimeBefore c : RefreshEachTimeBefore.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static RefreshEachTimeBefore valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
get
public abstract Class<? extends Annotation> get()
- Specified by:
get
in interfaceSupplier<Class<? extends Annotation>>
-
-