01: package test.dependent;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: import org.testng.annotations.AfterClass;
07: import org.testng.annotations.BeforeClass;
08: import org.testng.annotations.Test;
09:
10: @Test
11: public class DepBugSampleTest {
12: private static List<String> m_log = new ArrayList<String>();
13:
14: private static void log(String s) {
15: // ppp(s);
16: m_log.add(s);
17: }
18:
19: private static void ppp(String s) {
20: System.out.println("[DepBugSampleTest] " + s);
21: }
22:
23: public static List<String> getLog() {
24: return m_log;
25: }
26:
27: @BeforeClass
28: public void setup() throws Exception {
29: log("setup");
30: }
31:
32: @AfterClass
33: public void destroy() throws Exception {
34: log("destroy");
35: }
36:
37: @Test(dependsOnMethods="send")
38: public void get() throws Exception {
39: log("get");
40: }
41:
42: public void send() throws Exception {
43: log("send");
44: }
45:
46: public void list() throws Exception {
47: log("list");
48: }
49: }
|