01: package test.inheritance;
02:
03: import java.util.ArrayList;
04: import java.util.List;
05:
06: import org.testng.annotations.AfterMethod;
07: import org.testng.annotations.BeforeMethod;
08: import org.testng.annotations.BeforeTest;
09:
10: public class ZBase_0 {
11: protected static boolean m_verbose = false;
12: protected static List<String> m_methodList = new ArrayList<String>();
13:
14: @BeforeTest
15: public void beforeTest() {
16: m_methodList = new ArrayList<String>();
17: }
18:
19: @BeforeMethod
20: public void initApplication() {
21: m_methodList.add("initApplication");
22: ppp("INIT 0");
23: }
24:
25: @AfterMethod
26: public void tearDownApplication() {
27: m_methodList.add("tearDownApplication");
28: ppp("TEAR DOWN 0");
29: }
30:
31: private static void ppp(String s) {
32: if (m_verbose) {
33: System.out.println("[Z0] " + s);
34: }
35: }
36:
37: public static List<String> getMethodList() {
38: return m_methodList;
39: }
40: }
|