Package org.testng.internal
Class MethodGroupsHelper
- java.lang.Object
-
- org.testng.internal.MethodGroupsHelper
-
public class MethodGroupsHelper extends java.lang.Object
Collections of helper methods to help deal with test methods
-
-
Constructor Summary
Constructors Constructor Description MethodGroupsHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Map<java.lang.String,java.util.List<ITestNGMethod>>
findGroupsMethods(java.util.Collection<ITestClass> classes, boolean before)
Extracts the map of groups and their corresponding methods from theclasses
.protected static void
findGroupTransitiveClosure(java.util.List<ITestNGMethod> includedMethods, java.util.List<ITestNGMethod> allMethods, java.lang.String[] includedGroups, java.util.Set<java.lang.String> outGroups, java.util.Set<ITestNGMethod> outMethods)
protected static ITestNGMethod[]
findMethodsThatBelongToGroup(ITestNGMethod[] methods, java.lang.String groupRegexp)
protected static ITestNGMethod[]
findMethodsThatBelongToGroup(ITestNGMethod method, ITestNGMethod[] methods, java.lang.String groupRegexp)
Only used if a group is missing to flag an error on that method
-
-
-
Method Detail
-
findGroupsMethods
public static java.util.Map<java.lang.String,java.util.List<ITestNGMethod>> findGroupsMethods(java.util.Collection<ITestClass> classes, boolean before)
Extracts the map of groups and their corresponding methods from theclasses
.
-
findGroupTransitiveClosure
protected static void findGroupTransitiveClosure(java.util.List<ITestNGMethod> includedMethods, java.util.List<ITestNGMethod> allMethods, java.lang.String[] includedGroups, java.util.Set<java.lang.String> outGroups, java.util.Set<ITestNGMethod> outMethods)
-
findMethodsThatBelongToGroup
protected static ITestNGMethod[] findMethodsThatBelongToGroup(ITestNGMethod method, ITestNGMethod[] methods, java.lang.String groupRegexp)
Only used if a group is missing to flag an error on that method- Parameters:
method
- if no group is found, group regex is set as this method's missing groupmethods
- list of methods to searchgroupRegexp
- regex representing the group- Returns:
- all the methods that belong to the group specified by the regular expression groupRegExp. methods[] is the list of all the methods we are choosing from and method is the method that owns the dependsOnGroups statement (only used if a group is missing to flag an error on that method).
-
findMethodsThatBelongToGroup
protected static ITestNGMethod[] findMethodsThatBelongToGroup(ITestNGMethod[] methods, java.lang.String groupRegexp)
- Parameters:
methods
- list of methods to searchgroupRegexp
- regex representing the group- Returns:
- all the methods that belong to the group specified by the regular expression groupRegExp. methods[] is the list of all the methods we are choosing from.
-
-