Junit测试
来源:互联网 发布:win10有线网络无法上网 编辑:程序博客网 时间:2024/05/16 17:23
@RunWith(SpringJUnit4ClassRunner.class) //使用junit4进行测试
@ContextConfiguration
(locations={
"file:E:/DevelopedTools/green software/MyEclipse10/workSpace/Workspaces/Workspaces10/fcruise/WebRoot/WEB-INF/webApplicationContext.xml"
}) //加载配置文件
public class TravelDaoTest extends TestCase{
@Autowired
private ApplicationContext ac;上下文
@Autowired
private TravelDao t;
@Test
public void testTravelList(){
PageModel p=new PageModel();
p.setSearchKey("7");
List<Map<String,Object>> list=t.travelList(p);
}
}
@ContextConfiguration
(locations={
"file:E:/DevelopedTools/green software/MyEclipse10/workSpace/Workspaces/Workspaces10/fcruise/WebRoot/WEB-INF/webApplicationContext.xml"
}) //加载配置文件
public class TravelDaoTest extends TestCase{
@Autowired
private ApplicationContext ac;上下文
@Autowired
private TravelDao t;
@Test
public void testTravelList(){
PageModel p=new PageModel();
p.setSearchKey("7");
List<Map<String,Object>> list=t.travelList(p);
}
}
0 0
- junit测试
- JUnit测试
- Junit测试
- 测试 Junit
- junit测试
- Junit测试
- Junit测试
- Junit测试
- junit 测试
- Junit测试
- Junit测试
- Junit测试
- junit测试
- junit 测试
- JUnit测试
- Junit测试
- Junit测试
- Junit测试
- stm32ADC非DMA模式的多通道采集与注入通道的采集
- 手把手教你如何搭建iOS项目基本框架
- IDL随笔
- 低级的错误记录
- Xcode8真机测试问题二三事
- Junit测试
- onactivityforresult不执行或resultcode==0
- ViewDragHelper的使用详解
- OkHttp的使用和封装
- 欢迎使用CSDN-markdown编辑器
- [kuangbin带你飞]专题四 最短路练习 F POJ 3259
- gnuradio-companion入门指南
- http1和http2
- leetcode之7. Reverse Integer(要能存储大数,判断溢出)