java中的单元测试 其实就是添加注解@Test 使用步骤和建议 image.png demo(绿色是成功) 程序可以以颜色来判断成功 image.png 我们断言这个程序的结果为5 但是实际结果为3 所以断言失败,结果为红色 image.png @Before @After image.png