01: package test.methodselectors;
02:
03: import java.util.List;
04:
05: import org.testng.IMethodSelector;
06: import org.testng.IMethodSelectorContext;
07: import org.testng.ITestNGMethod;
08:
09: public class Test2MethodSelector implements IMethodSelector {
10:
11: public boolean includeMethod(IMethodSelectorContext context,
12: ITestNGMethod method, boolean isTestMethod) {
13: for (String group : method.getGroups()) {
14: if (group.equals("test2")) {
15: context.setStopped(true);
16: return true;
17: }
18: }
19:
20: return false;
21: }
22:
23: public void setTestMethods(List<ITestNGMethod> testMethods) {
24: // TODO Auto-generated method stub
25:
26: }
27:
28: }
|