01: package test.invocationcount;
02:
03: import org.testng.annotations.BeforeClass;
04: import org.testng.annotations.Test;
05:
06: public class FailedInvocationCount {
07: int m_count;
08:
09: @BeforeClass
10: public void setUp() {
11: m_count = 0;
12: }
13:
14: @Test(invocationCount=10)
15: public void f() {
16: if (m_count++ > 3) {
17: throw new RuntimeException();
18: }
19: }
20:
21: }
|