• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.tmp;
2 
3 import org.testng.annotations.Configuration;
4 
5 public class TestFixture {
6 
7   public static int globalCallSequence = 0;
8 
printGlobalCallSequence(String methodName)9   public static int printGlobalCallSequence(String methodName) {
10     globalCallSequence++;
11     System.err.println("*** " + methodName + ": globalCallSequence=" + globalCallSequence);
12     return globalCallSequence;
13   }
14 
15   public int fixtureBeforeTestCallSequence;
16 
17   @Configuration(beforeTest=true, groups="fixture")
beforeTest()18   public void beforeTest() {
19     fixtureBeforeTestCallSequence = printGlobalCallSequence("TestFixture.beforeTest");
20   }
21 
getSomeRandomValue()22   public int getSomeRandomValue() {
23     return 20;
24   }
25 
26 }
27