码迷,mamicode.com
首页 > 其他好文 > 详细

复利计算器单元测试

时间:2016-03-30 09:29:21      阅读:118      评论:0      收藏:0      [点我收藏+]

标签:

技术分享
public void testInputYear(){
        boolean result=true;
        int year=Compounding.InputYear(-1);
        if(year<0||year>100)
        result= false;
        else 
        result=true;
        assertEquals(false, true);
    }
技术分享

技术分享

 

不知道哪里错误,每次的测试都是红色条条。

 

@Test
    public void testCompoundYear() {
        int compoundYear = Compounding.compoundYear(1000000, 0.1, 2000000);
        assertEquals(7, compoundYear);
    }

 

技术分享

 

复利计算器单元测试

标签:

原文地址:http://www.cnblogs.com/mafu0420/p/5335730.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!