摘要:        
package com.ss1.junit; public class Calculator { public int add(int one, int another) { // 为了简单起见,暂不考虑溢出等情况。 return one + another; } public int multiply(int one, int an...    阅读全文
posted @ 2016-08-09 14:40
公众号java-codestack
阅读(192)
评论(0)
推荐(0)
        
            
        
        
摘要:        
JUnit是Java单元测试框架,已经在Eclipse中默认安装。目前主流的有JUnit3和JUnit4。JUnit3中,测试用例需要继承TestCase类。JUnit4中,测试用例无需继承TestCase类,只需要使用@Test等注解。 只需要在builpath中addlibrary添加junit    阅读全文
posted @ 2016-08-09 14:03
公众号java-codestack
阅读(745)
评论(0)
推荐(0)
        
 
                    
                     
                    
                 
                    
                
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号