单元测试 junit

来源:互联网 发布:appuploader windows 编辑:程序博客网 时间:2024/06/10 22:41
import java.util.HashMap;import java.util.List;import java.util.Map;import org.junit.Assert;import org.junit.Test;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.junit4.AbstractTransactionalJUnit4SpringContextTests;@ContextConfiguration(locations = {"file:src/test/resources/test-service.xml"})public class CountInfoServiceImplTest extends AbstractTransactionalJUnit4SpringContextTests{@Autowiredprivate CountInfoService countInfoService;@Testpublic void testDendMsg() {ApplyClaimReq req = new ApplyClaimReq();req.setWaybillNo("493050030200");req.setJobId("2153397205");req.setOpenId("sdffds432423dfdfs432423");req.setSendPhone("13711111111");req.setClaimer("小哥");req.setClaimerPhone("13733333333");Result r = (Result) countInfoService.sendMsg(req);Assert.assertTrue(r.isSuccess()); }}//test-service.xml配置文件<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd"><!-- <import resource="classpath*:META-INF/spring/spring*.xml" /> --><import resource="classpath*:META-INF/spring/spring-config*.xml" /><import resource="classpath*:META-INF/spring/spring-ehcache*.xml" /></beans>


 
阅读全文
'); })();
0 0
原创粉丝点击
热门IT博客
热门问题 老师的惩罚 人脸识别 我在镇武司摸鱼那些年 重生之率土为王 我在大康的咸鱼生活 盘龙之生命进化 天生仙种 凡人之先天五行 春回大明朝 姑娘不必设防,我是瞎子 歌莉娅羽绒服 歌莉娅秋装 歌莉娅外套 歌莉娅女裙 歌莉娅代购 歌莉娅女包旗舰店 歌莉娅床上用品 歌莉娅特卖 歌莉娅打底衫 正佳歌莉娅 歌莉娅专卖店 歌莉娅招聘 歌莉娅包包怎么样 歌莉娅大衣 歌莉娅2014 歌莉娅属于什么档次 歌莉娅的衣服怎么样 歌丽娅 goelia 叶南弦沈蔓歌免费阅读50章 蔓丽黛颜 蔓丽黛颜化妆品价格表 法国科丽蔓面膜怎么样 歌行体 歌行体的主要特点 小丑表演是什么歌 歌表演 歌曲表演 乐队表演 表演唱 遇见一场烟火的表演是什么歌 遇见一场烟火的表演是哪首歌 十九畏歌诀 八会穴歌诀 药性赋歌诀 经络歌诀 中药药性歌诀 中医入门歌诀 络穴歌诀 历史歌诀 中医歌诀