Commit 4659c86c by fsn

更改测试基类名称

parent 783ddaae
...@@ -22,8 +22,8 @@ import org.springframework.web.context.WebApplicationContext; ...@@ -22,8 +22,8 @@ import org.springframework.web.context.WebApplicationContext;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(classes = GunsApplication.class) @SpringBootTest(classes = GunsApplication.class)
@WebAppConfiguration @WebAppConfiguration
@Transactional @Transactional //测试之后数据可回滚
public class BaseTest { public class BaseJunit {
@Autowired @Autowired
WebApplicationContext webApplicationContext; WebApplicationContext webApplicationContext;
......
package com.stylefeng.guns.system; package com.stylefeng.guns.system;
import com.stylefeng.guns.base.BaseTest; import com.stylefeng.guns.base.BaseJunit;
import com.stylefeng.guns.modular.system.dao.NoticeDao; import com.stylefeng.guns.modular.system.dao.NoticeDao;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -16,7 +16,7 @@ import static org.junit.Assert.assertTrue; ...@@ -16,7 +16,7 @@ import static org.junit.Assert.assertTrue;
* @author fengshuonan * @author fengshuonan
* @date 2017-05-21 15:02 * @date 2017-05-21 15:02
*/ */
public class BlackBoardTest extends BaseTest { public class BlackBoardTest extends BaseJunit {
@Autowired @Autowired
NoticeDao noticeDao; NoticeDao noticeDao;
......
package com.stylefeng.guns.system; package com.stylefeng.guns.system;
import com.stylefeng.guns.base.BaseTest; import com.stylefeng.guns.base.BaseJunit;
import com.stylefeng.guns.common.persistence.dao.DeptMapper; import com.stylefeng.guns.common.persistence.dao.DeptMapper;
import com.stylefeng.guns.common.persistence.model.Dept; import com.stylefeng.guns.common.persistence.model.Dept;
import com.stylefeng.guns.modular.system.dao.DeptDao; import com.stylefeng.guns.modular.system.dao.DeptDao;
...@@ -19,7 +19,7 @@ import static org.junit.Assert.assertTrue; ...@@ -19,7 +19,7 @@ import static org.junit.Assert.assertTrue;
* @author fengshuonan * @author fengshuonan
* @date 2017-04-27 17:05 * @date 2017-04-27 17:05
*/ */
public class DeptTest extends BaseTest { public class DeptTest extends BaseJunit {
@Resource @Resource
DeptDao deptDao; DeptDao deptDao;
......
package com.stylefeng.guns.system; package com.stylefeng.guns.system;
import com.stylefeng.guns.base.BaseTest; import com.stylefeng.guns.base.BaseJunit;
import com.stylefeng.guns.modular.system.dao.DictDao; import com.stylefeng.guns.modular.system.dao.DictDao;
import com.stylefeng.guns.modular.system.service.IDictService; import com.stylefeng.guns.modular.system.service.IDictService;
import org.junit.Assert; import org.junit.Assert;
...@@ -16,7 +16,7 @@ import java.util.Map; ...@@ -16,7 +16,7 @@ import java.util.Map;
* @author fengshuonan * @author fengshuonan
* @date 2017-04-27 17:05 * @date 2017-04-27 17:05
*/ */
public class DictTest extends BaseTest { public class DictTest extends BaseJunit {
@Resource @Resource
IDictService dictService; IDictService dictService;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment