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