01: package test.sample;
02:
03: import org.testng.Assert;
04:
05: import junit.framework.TestCase;
06:
07: /**
08: * This class verifies that a new instance is used every time
09: *
10: * @author cbeust
11: */
12: public class JUnitSample3 extends TestCase {
13: private int m_count = 0;
14:
15: public void test1() {
16: Assert.assertEquals(m_count, 0);
17: m_count++;
18: }
19:
20: public void test2() {
21: Assert.assertEquals(m_count, 0);
22: m_count++;
23: }
24:
25: private static void ppp(String s) {
26: System.out.println("[JUnitSample3] " + s);
27: }
28: }
|