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 final Map<String, CountDownLatch> private 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 TypeMethodDescriptiongetAfterGroupMethods(ITestNGMethod testMethod) getBeforeGroupMethodsForGroup(String[] groups) private Map<String, List<ITestNGMethod>> private booleanisAfterGroupAllowedToRunAfterTestMethod(ITestNGMethod afterGroupMethod, Set<String> testMethodGroups) private booleanisLastMethodForGroup(String group, ITestNGMethod method) voidremoveAfterGroups(Collection<String> groups) voidremoveBeforeGroups(String[] groups) private static List<ITestNGMethod> retrieve(Map<String, CountDownLatch> tracker, Map<String, List<ITestNGMethod>> map, String group) 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
-
getBeforeGroupMethodsForGroup
-
getAfterGroupMethods
-
isAfterGroupAllowedToRunAfterTestMethod
private boolean isAfterGroupAllowedToRunAfterTestMethod(ITestNGMethod afterGroupMethod, Set<String> testMethodGroups) -
removeBeforeGroups
-
removeAfterGroups
-
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
-
retrieve
private static List<ITestNGMethod> retrieve(Map<String, CountDownLatch> tracker, Map<String, List<ITestNGMethod>> map, String group) -
retrieve
private static List<ITestNGMethod> retrieve(Set<String> tracker, Map<String, List<ITestNGMethod>> map, String group)
-