01: package test.invocationcount;
02:
03: public class FailedInvocationCount2 {
04: int m_count;
05: int m_count2;
06:
07: /**
08: * @testng.before-class
09: */
10: public void setUp() {
11: m_count = 0;
12: m_count2 = 0;
13: }
14:
15: /**
16: * @testng.test invocationCount="10" skipFailedInvocations="true"
17: */
18: public void shouldSkipFromAnnotation() {
19: if (m_count++ > 3) {
20: throw new RuntimeException();
21: }
22: }
23:
24: /**
25: * @testng.test invocationCount="10" skipFailedInvocations="false"
26: */
27: public void shouldNotSkipFromAnnotation() {
28: if (m_count2++ > 3) {
29: throw new RuntimeException();
30: }
31: }
32:
33: }
|