1package test.dependent;
2
3import org.testng.annotations.Test;
4
5import test.BaseTest;
6
7
8public class ClassDependsOnGroups extends BaseTest {
9  @Test
10  public void verifyDependsOnGroups() {
11     addClass(test.dependent.DifferentClassDependsOnGroupsTest1.class.getName());
12     addClass(test.dependent.DifferentClassDependsOnGroupsTest2.class.getName());
13
14     run();
15     String[] failed = {
16        "test0"
17     };
18     String[] skipped = {
19         "test1", "test2"
20     };
21     verifyTests("Failed", failed, getFailedTests());
22     verifyTests("Skipped", skipped, getSkippedTests());
23  }
24
25  @Test
26  public void verifyGroupsAcrossClasses() {
27     addClass(test.dependent.C1.class.getName());
28     addClass(test.dependent.C2.class.getName());
29
30     run();
31     String[] failed = {
32        "failingTest"
33     };
34     String[] skipped = {
35         "shouldBeSkipped"
36     };
37     verifyTests("Failed", failed, getFailedTests());
38     verifyTests("Skipped", skipped, getSkippedTests());
39  }
40}
41