01: package test.sample;
02:
03: public class Basic1 {
04: static private int m_count = 0;
05:
06: public static void incrementCount() {
07: m_count++;
08: }
09:
10: public static int getCount() {
11: return m_count;
12: }
13:
14: /**
15: * @testng.before-method
16: */
17: public void beforeTestMethod() {
18: incrementCount();
19: }
20:
21: /**
22: * @testng.test groups="basic1"
23: */
24: public void basic1() {
25: assert getCount() > 0 : "COUNT WAS NOT INCREMENTED";
26: }
27:
28: static private void ppp(String s) {
29: System.out.println("[Basic1] " + s);
30: }
31: }
|