1 package test.configuration; 2 3 import org.testng.TestNG; 4 import org.testng.annotations.Test; 5 6 import test.SimpleBaseTest; 7 import junit.framework.Assert; 8 9 public class BeforeClassWithDisabledTest extends SimpleBaseTest { 10 11 @Test afterClassShouldRunEvenWithDisabledMethods()12 public void afterClassShouldRunEvenWithDisabledMethods() { 13 TestNG tng = create(new Class[] { ConfigurationDisabledSampleTest.class }); 14 Assert.assertFalse(ConfigurationDisabledSampleTest.m_afterWasRun); 15 tng.run(); 16 Assert.assertTrue(ConfigurationDisabledSampleTest.m_afterWasRun); 17 } 18 } 19 20 21