1 package test.conffailure; 2 3 import org.testng.annotations.AfterClass; 4 import org.testng.annotations.BeforeClass; 5 6 public class ClassWithFailedBeforeSuiteVerification { 7 8 private static boolean m_success1 = true; 9 private static boolean m_success2 = true; 10 11 // Should not be run because beforeSuite failed on the other class 12 @BeforeClass setUp()13 public void setUp() { 14 m_success1 = false; 15 } 16 17 // Should not be run because beforeSuite failed on the other class 18 @AfterClass tearDown()19 public void tearDown() { 20 m_success2 = false; 21 } 22 success()23 static public boolean success() { 24 return m_success1 && m_success2; 25 } 26 } 27