Package org.testng.internal
Class ConfigurationGroupMethods
java.lang.Object
org.testng.internal.ConfigurationGroupMethods
This class wraps access to beforeGroups and afterGroups methods, since they are passed around the
various invokers and potentially modified in different threads.
- Since:
- 5.3 (Mar 2, 2006)
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Map<String,
List<ITestNGMethod>> A map that returns the last method belonging to the given groupprivate final Map<String,
List<ITestNGMethod>> The list of afterGroups methods keyed by the name of the groupprivate final ITestNGMethod[]
The list of all test methodsprivate final Map<String,
List<ITestNGMethod>> The list of beforeGroups methods keyed by the name of the group -
Constructor Summary
ConstructorsConstructorDescriptionConfigurationGroupMethods
(IContainer<ITestNGMethod> container, Map<String, List<ITestNGMethod>> beforeGroupsMethods, Map<String, List<ITestNGMethod>> afterGroupsMethods) -
Method Summary
Modifier and TypeMethodDescriptionprivate Map<String,
List<ITestNGMethod>> boolean
isLastMethodForGroup
(String group, ITestNGMethod method) void
removeAfterGroups
(Collection<String> groups) void
removeBeforeGroups
(String[] groups) private static List<ITestNGMethod>
-
Field Details
-
m_beforeGroupsMethods
The list of beforeGroups methods keyed by the name of the group -
beforeGroupsThatHaveAlreadyRun
-
afterGroupsThatHaveAlreadyRun
-
m_afterGroupsMethods
The list of afterGroups methods keyed by the name of the group -
m_allMethods
The list of all test methods -
m_afterGroupsMap
A map that returns the last method belonging to the given group
-
-
Constructor Details
-
ConfigurationGroupMethods
public ConfigurationGroupMethods(IContainer<ITestNGMethod> container, Map<String, List<ITestNGMethod>> beforeGroupsMethods, Map<String, List<ITestNGMethod>> afterGroupsMethods)
-
-
Method Details
-
getBeforeGroupsMethods
-
getAfterGroupsMethods
-
isLastMethodForGroup
- Parameters:
group
- The group namemethod
- The test method- Returns:
- true if the passed method is the last to run for the group. This method is used to figure out when is the right time to invoke afterGroups methods.
-
initializeAfterGroupsMap
-
getBeforeGroupMethodsForGroup
-
getAfterGroupMethodsForGroup
-
removeBeforeGroups
-
removeAfterGroups
-
retrieve
private static List<ITestNGMethod> retrieve(Set<String> tracker, Map<String, List<ITestNGMethod>> map, String group)
-