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 assertEquals(100.0,new Square(10).getArea()); 16 assertEquals(314.1592653589793,new Circle(10).getArea()); 17 assertEquals(43.30127018922193,new EquilateralTriangle(10).getArea()); 18 } 19 20 protected void tearDown() throws Exception { 21 super.tearDown(); 22 } 23 24 }