• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package test.sample;
2 
3 import org.testng.annotations.BeforeMethod;
4 import org.testng.annotations.Test;
5 
6 public class Basic1 {
7   static private int m_count = 0;
8 
incrementCount()9   public static void incrementCount() {
10     m_count++;
11   }
12 
getCount()13   public static int getCount() {
14     return m_count;
15   }
16 
17   @BeforeMethod
beforeTestMethod()18   public void beforeTestMethod() {
19     incrementCount();
20   }
21 
22   @Test(groups = { "basic1" } )
basic1()23   public void basic1() {
24     assert getCount() > 0 : "COUNT WAS NOT INCREMENTED";
25   }
26 
ppp(String s)27   static private void ppp(String s) {
28     System.out.println("[Basic1] " + s);
29   }
30 }