1 import junit.framework.TestCase; 2 3 4 public class FigureTest extends TestCase { 5 6 public FigureTest(String name) { 7 super(name); 8 } 9 10 protected void setUp() throws Exception { 11 super.setUp(); 12 } 13 14 public void test_getArea(){ 15 Figure figure = new Figure(); 16 assertEquals(100.0,figure.getArea(10,"Square")); 17 assertEquals(314.1592653589793,figure.getArea(10,"Circle")); 18 assertEquals(43.30127018922193,figure.getArea(10,"EquilateralTriang1e")); 19 } 20 21 protected void tearDown() throws Exception { 22 super.tearDown(); 23 } 24 25 }