1 package test.dependent;
2 
3 import org.testng.annotations.Test;
4 
5 /**
6  * This class
7  *
8  * @author Cedric Beust, Aug 20, 2004
9  *
10  */
11 public class BaseOrderMethodTest {
12   protected boolean[] m_group1 = {
13       false, false
14   };
15   protected boolean[] m_group2 = {
16       false, false
17   };
18   protected boolean[] m_group3 = {
19       false
20   };
21 
22   @Test(groups = { "2.0" }, dependsOnGroups = { "1.0", "1.1" })
a_second0()23   public void a_second0() {
24     verifyGroup(2, m_group1);
25     m_group2[0] = true;
26   }
27 
28   @Test(groups = { "3" }, dependsOnGroups = { "2.0" })
third0()29   public void third0() {
30     verifyGroup(3, m_group2);
31     m_group3[0] = true;
32   }
33 
ppp(String s)34     public static void ppp(String s) {
35 	    System.out.println("[BaseOrderMethodTest] " + s);
36     }
37 
38 
verifyGroup(int groupNumber, boolean[] group)39     protected void verifyGroup(int groupNumber, boolean[] group) {
40       for (int i = 0; i < group.length; i++) {
41         assert group[i] : "Error while running group " + groupNumber + ": "
42         + " index " + i
43         + " of previous group should have been run before.";
44       }
45     }
46 
47 }
48