01: package test.dependent;
02:
03: import org.testng.AssertJUnit;
04:
05: public class DependsWithRegexp {
06: private boolean m_1 = false;
07: private boolean m_2 = false;
08:
09: /**
10: * @testng.test groups="start"
11: */
12: public void start() {
13: AssertJUnit.assertFalse(m_1);
14: AssertJUnit.assertFalse(m_2);
15: m_1 = true;
16: }
17:
18: /**
19: * @testng.test dependsOnGroups="start.*" groups="stop"
20: */
21: public void stop() {
22: AssertJUnit.assertTrue(m_1);
23: AssertJUnit.assertFalse(m_2);
24: m_2 = true;
25: }
26:
27: /**
28: * @testng.after-test
29: *
30: */
31: public void verify() {
32: AssertJUnit.assertTrue(m_1);
33: AssertJUnit.assertTrue(m_2);
34: }
35:
36: }
|