黄页网站大全通俗易懂,国家政务服务平台官网入口,建设部网站人员查询,网站建设需求计划结对#xff1a;人#xff1a;孙帅 博客地址#xff1a; http://www.cnblogs.com/s3366181/p/4509260.html一、 题目简介 1.所选题目#xff1a;输出圆的面积 2.编程工具#xff1a;Eclipse 3、实现功能#xff1a;用户给定一圆的半径运行程序系统会给出给定半径圆的面…结对人孙帅 博客地址 http://www.cnblogs.com/s3366181/p/4509260.html 一、 题目简介 1.所选题目输出圆的面积 2.编程工具Eclipse 3、实现功能用户给定一圆的半径运行程序系统会给出给定半径圆的面积。 二、结对分工及过程 我负责JUnit4测试这部分孙帅同学负责圆的面积计算的代码编写。 三、代码地址 https://github.com/liujing1994/TestCircle 四、测试情况 所设计的模块测试用例 public class TestCircle3 { /** Main method */ public static void main(String[] args) { // Create a Circle with radius 5.0 Circle3 myCircle new Circle3(5.0); System.out.println(The area of the circle of radius myCircle.getRadius() is myCircle.getArea()); // Increase myCircles radius by 10% myCircle.setRadius(myCircle.getRadius() * 1.1); System.out.println(The area of the circle of radius myCircle.getRadius() is myCircle.getArea()); } } import static org.junit.Assert.*; import org.junit.Before; import org.junit.Test; public class TestCircle3Test extends TestCircle3 { Before public void setUp() throws Exception { } Test public void test() { fail(Not yet implemented); } } 测试结果截图 五、问题及心得 在这次试验中我练习了如何通过JUnit4选用测试用例给主类测试在测试过程中我的程序出现了“共测试了1个测试0个被忽略1个测试失败”后来通过代码的修改最终还是成功了。所以编程序不能急于求成要有耐心有定力。 转载于:https://www.cnblogs.com/liujing123/p/4509277.html