1 7 8 package org.netbeans.test.junit.testresults.test; 9 10 import junit.framework.*; 11 12 16 public class TestClassTest extends TestCase { 17 18 public TestClassTest(String testName) { 19 super(testName); 20 } 21 22 protected void setUp() throws Exception { 23 } 24 25 protected void tearDown() throws Exception { 26 } 27 28 public static Test suite() { 29 junit.framework.TestSuite suite = 30 new junit.framework.TestSuite(TestClassTest.class); 31 return suite; 32 } 33 34 37 public void testAdd0() { 38 System.out.println("add0"); 39 40 int a = 1; 41 int b = 1; 42 TestClass instance = new TestClass(); 43 44 int expResult = 2; 45 int result = instance.add0(a, b); 46 assertEquals(expResult, result); 47 } 48 49 52 public void testAdd1() { 53 System.out.println("add1"); 54 55 int a = 1; 56 int b = 1; 57 TestClass instance = new TestClass(); 58 59 int expResult = 0; int result = instance.add1(a, b); 61 assertEquals(expResult, result); 62 } 63 64 } 65 | Popular Tags |