01: package test.conffailure;
02:
03: import org.testng.annotations.AfterClass;
04: import org.testng.annotations.BeforeClass;
05:
06: public class ClassWithFailedBeforeSuiteVerification {
07:
08: private static boolean m_success1 = true;
09: private static boolean m_success2 = true;
10:
11: // Should not be run because beforeSuite failed on the other class
12: @BeforeClass
13: public void setUp() {
14: m_success1 = false;
15: }
16:
17: // Should not be run because beforeSuite failed on the other class
18: @AfterClass
19: public void tearDown() {
20: m_success2 = false;
21: }
22:
23: static public boolean success() {
24: return m_success1 && m_success2;
25: }
26: }
|