01: package test.dependent;
02:
03: public class Test1 {
04: private boolean m_oneA = false;
05: private boolean m_oneB = false;
06: private boolean m_secondA = false;
07:
08: /**
09: * @testng.test
10: */
11: public void oneA() {
12: // ppp("oneA");
13: assert !m_secondA : "secondA shouldn't have been run yet";
14: m_oneA = true;
15: }
16:
17: /**
18: * @testng.test dependsOnMethods = "oneA";
19: */
20: public void secondA() {
21: // ppp("secondA");
22: assert m_oneA : "oneA wasn't run";
23: assert m_oneB : "oneB wasn't run";
24: assert !m_secondA : "secondA shouldn't have been run yet";
25: m_secondA = true;
26: }
27: }
|