• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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
bs()20   public void bs() {
21     m_bs = true;
22   }
23 
24   @BeforeTest
bt()25   public void bt() {
26     m_bt = true;
27   }
28 
29   @BeforeMethod
bm(Method m)30   public void bm(Method m) {
31     m_bm = true;
32   }
33 
34   @BeforeClass
bc()35   public void bc() {
36     m_bc = true;
37   }
38 
39 }
40