Junit :测试
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
</dependencies>
写在测试类里:
import static org.junit.Assert.*;//导入Assert类所有的静态方法 public class TriangleTest{ @Test public void test(){ assertEquals(flase,new Triangle().judgEdges(1,2,3)); } }
asserEquals(期待的结果,测试用例)