Class ConfigurationGroupMethods


  • public class ConfigurationGroupMethods
    extends java.lang.Object
    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)
    • Constructor Detail

      • ConfigurationGroupMethods

        public ConfigurationGroupMethods​(ITestNGMethod[] allMethods,
                                         java.util.Map<java.lang.String,​java.util.List<ITestNGMethod>> beforeGroupsMethods,
                                         java.util.Map<java.lang.String,​java.util.List<ITestNGMethod>> afterGroupsMethods)
    • Method Detail

      • getBeforeGroupsMethods

        public java.util.Map<java.lang.String,​java.util.List<ITestNGMethod>> getBeforeGroupsMethods()
      • getAfterGroupsMethods

        public java.util.Map<java.lang.String,​java.util.List<ITestNGMethod>> getAfterGroupsMethods()
      • isLastMethodForGroup

        public boolean isLastMethodForGroup​(java.lang.String group,
                                            ITestNGMethod 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.
      • getBeforeGroupMethodsForGroup

        public java.util.List<ITestNGMethod> getBeforeGroupMethodsForGroup​(java.lang.String group)
      • getAfterGroupMethodsForGroup

        public java.util.List<ITestNGMethod> getAfterGroupMethodsForGroup​(java.lang.String group)
      • removeBeforeGroups

        public void removeBeforeGroups​(java.lang.String[] groups)
      • removeAfterGroups

        public void removeAfterGroups​(java.util.Collection<java.lang.String> groups)