org.testng.internal
Class XmlMethodSelector

java.lang.Object
  extended by org.testng.internal.XmlMethodSelector
All Implemented Interfaces:
java.io.Serializable, IMethodSelector

public class XmlMethodSelector
extends java.lang.Object
implements IMethodSelector

This class is the default method selector used by TestNG to determine which methods need to be included and excluded based on the specification given in testng.xml. Created on Sep 30, 2005

Author:
cbeust
See Also:
Serialized Form

Constructor Summary
XmlMethodSelector()
           
 
Method Summary
 java.util.Map<java.lang.String,java.lang.String> getExcludedGroups()
           
 java.util.Map<java.lang.String,java.lang.String> getIncludedGroups()
           
 boolean includeMethod(IMethodSelectorContext context, ITestNGMethod tm, boolean isTestMethod)
           
 void setExcludedGroups(java.util.Map<java.lang.String,java.lang.String> excludedGroups)
           
 void setExpression(java.lang.String expression)
           
 void setIncludedGroups(java.util.Map<java.lang.String,java.lang.String> includedGroups)
           
 void setTestMethods(java.util.List<ITestNGMethod> testMethods)
          Invoked when all the test methods are known so that the method selector can perform additional work, such as adding the transitive closure of all the groups being included and depended upon.
 void setVerbose(boolean b)
           
 void setXmlClasses(java.util.List<XmlClass> classes)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XmlMethodSelector

public XmlMethodSelector()
Method Detail

includeMethod

public boolean includeMethod(IMethodSelectorContext context,
                             ITestNGMethod tm,
                             boolean isTestMethod)
Specified by:
includeMethod in interface IMethodSelector
Parameters:
context - The selector context. The implementation of this method can invoke setHalted(true) to indicate that no other Method Selector should be invoked by TestNG after this one. Additionally, this implementation can manipulate the Map object returned by getUserData().
tm - The test method
isTestMethod - true if this is a @Test method, false if it's a
Returns:
true if this method should be included in the test run, false otherwise

setXmlClasses

public void setXmlClasses(java.util.List<XmlClass> classes)

getExcludedGroups

public java.util.Map<java.lang.String,java.lang.String> getExcludedGroups()
Returns:
Returns the excludedGroups.

getIncludedGroups

public java.util.Map<java.lang.String,java.lang.String> getIncludedGroups()
Returns:
Returns the includedGroups.

setExcludedGroups

public void setExcludedGroups(java.util.Map<java.lang.String,java.lang.String> excludedGroups)
Parameters:
excludedGroups - The excludedGroups to set.

setIncludedGroups

public void setIncludedGroups(java.util.Map<java.lang.String,java.lang.String> includedGroups)
Parameters:
includedGroups - The includedGroups to set.

setExpression

public void setExpression(java.lang.String expression)

setTestMethods

public void setTestMethods(java.util.List<ITestNGMethod> testMethods)
Description copied from interface: IMethodSelector
Invoked when all the test methods are known so that the method selector can perform additional work, such as adding the transitive closure of all the groups being included and depended upon.

Specified by:
setTestMethods in interface IMethodSelector

setVerbose

public void setVerbose(boolean b)


Copyright © 2010. All Rights Reserved.