1package test.verify;
2
3import org.testng.annotations.Listeners;
4import org.testng.annotations.Test;
5
6/**
7 * Illustrate the implementation of a @Verify/@Verifier test.
8 *
9 * One method should be annotated with @Verifier and then each test method
10 * annotated with @Verify will be followed with a call to the @Verifier
11 * method.
12 */
13@Listeners(VerifyMethodInterceptor.class)
14public class VerifySampleTest {
15
16  @Verify
17  @Test
18  public void f1() {
19    log("f1");
20  }
21
22  @Verify
23  @Test
24  public void f2() {
25    log("f2");
26  }
27
28  @Verifier
29  @Test
30  public void verify() {
31    log("Verifying");
32  }
33
34  private void log(String string) {
35    if (false) {
36      System.out.println(string);
37    }
38  }
39}
40