1 package test.inheritance; 2 3 import org.testng.annotations.AfterMethod; 4 import org.testng.annotations.BeforeMethod; 5 import org.testng.annotations.BeforeTest; 6 7 import java.util.ArrayList; 8 import java.util.List; 9 10 public class ZBase_0 { 11 protected static boolean m_verbose = false; 12 protected static List<String> m_methodList = new ArrayList<>(); 13 14 @BeforeTest 15 public void beforeTest() { 16 m_methodList = new ArrayList<>(); 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 } 41