Home | History | Annotate | Download | only in hook
      1 package test.hook;
      2 
      3 import org.testng.IConfigurable;
      4 import org.testng.annotations.BeforeClass;
      5 import org.testng.annotations.BeforeMethod;
      6 import org.testng.annotations.BeforeSuite;
      7 import org.testng.annotations.BeforeTest;
      8 
      9 import java.lang.reflect.Method;
     10 
     11 abstract public class BaseConfigurable implements IConfigurable {
     12   static int m_hookCount = 0;
     13   static boolean m_bs = false;
     14   static boolean m_bt = false;
     15   static boolean m_bm = false;
     16   static boolean m_bc = false;
     17   static String m_methodName = null;
     18 
     19   @BeforeSuite
     20   public void bs() {
     21     m_bs = true;
     22   }
     23 
     24   @BeforeTest
     25   public void bt() {
     26     m_bt = true;
     27   }
     28 
     29   @BeforeMethod
     30   public void bm(Method m) {
     31     m_bm = true;
     32   }
     33 
     34   @BeforeClass
     35   public void bc() {
     36     m_bc = true;
     37   }
     38 
     39 }
     40