
Junit
爱吃鱼油
这个作者很懒,什么都没留下…
展开
-
Junit4单元测试(2)
package test; import org.junit.AfterClass; import org.junit.BeforeClass; import org.junit.Ignore; import org.junit.Test; import com.foo.wh.*; /** * 测试类 * @author * */ public class TestMyMath {原创 2015-01-25 16:28:09 · 564 阅读 · 0 评论 -
SpringBoot Junit单元测试
Junit单元测试 import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.boot.test.SpringApplicationConfiguration; import org.springframework.test.context.ContextConfiguration; im原创 2016-08-17 14:09:49 · 2397 阅读 · 0 评论 -
Junit4单元测试(1)
看了很多资料,有的是用Junit3比较麻烦,对测试类必须继承.TestCase,对类的方法也有要求必须test开头。 下面正题。。。 首先下载.Junit4开发包,jar包已经上传,junit-4.9.jar引入到工程中,package com.foo.www; /** * 待单元测试的类 * @author * */ public class MyMath { publi原创 2015-01-25 15:26:24 · 676 阅读 · 0 评论 -
junit4 (三)和spring-test结合使用
使用注解简化了可以和Junit文章相比较看出。import org.junit.Assert; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.c原创 2015-02-12 16:12:36 · 818 阅读 · 0 评论