01: package test.failedconfs;
02:
03: public class Test1 {
04: /**
05: * @testng.before-method
06: */
07: public void failingBeforeTestMethod() {
08: System.out.println("failingBeforeTestMethod");
09: FailedBeforeTestMethodConfigurationBehaviorTest.s_failedBeforeTestMethodInvoked = true;
10: throw new RuntimeException("expected exception thrown");
11: }
12:
13: /**
14: * @testng.test
15: */
16: public void testMethod1() {
17: System.out.println("testMethod1");
18: FailedBeforeTestMethodConfigurationBehaviorTest.s_failureClassMethods++;
19: }
20:
21: /**
22: * @testng.test
23: */
24: public void testMethod2() {
25: System.out.println("testMethod2");
26: FailedBeforeTestMethodConfigurationBehaviorTest.s_failureClassMethods++;
27: }
28: }
|