1 package test.sample; 2 3 import org.testng.Assert; 4 5 import junit.framework.TestCase; 6 7 /** 8 * This class verifies that a new instance is used every time 9 * 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 } 29