Home | History | Annotate | Download | only in configuration
      1 package test.configuration;
      2 
      3 import org.testng.annotations.AfterClass;
      4 import org.testng.annotations.BeforeClass;
      5 import org.testng.annotations.Test;
      6 
      7 public class ConfigurationDisabledSampleTest {
      8 
      9   public static boolean m_afterWasRun;
     10 
     11   @BeforeClass(alwaysRun = true)
     12   public void before() {
     13     m_afterWasRun = false;
     14   }
     15 
     16   @AfterClass(alwaysRun = true)
     17   public void after() {
     18     m_afterWasRun = true;
     19   }
     20 
     21   @Test
     22   public void f1() {}
     23 
     24   @Test(enabled = false)
     25   public void f2() {}
     26 }