JUnit 测试
来源:互联网 发布:天下3用数据流量玩 编辑:程序博客网 时间:2024/06/05 19:04
</pre><pre name="code" class="java">import javax.annotation.Resource;import junit.framework.Assert;import org.junit.Test;import org.junit.runner.RunWith;import org.springframework.test.context.ContextConfiguration;import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;import com.frm.entity.User;
@RunWith(SpringJUnit4ClassRunner.class)@ContextConfiguration(locations={"classpath:config/applicationContext.xml"})//若多个配置文件,则继续在locations里追加public class DaoSupportTest {@Resource(name="daoSupport")DaoSupport dao;@Testpublic void testFindForObject() throws Exception {User user=(User) dao.findForObject("UserMapper.findUserById", "1");Assert.assertEquals("sj", user.getUsername());}}
0 0
- junit测试
- JUnit测试
- Junit测试
- 测试 Junit
- junit测试
- Junit测试
- Junit测试
- Junit测试
- junit 测试
- Junit测试
- Junit测试
- Junit测试
- junit测试
- junit 测试
- JUnit测试
- Junit测试
- Junit测试
- Junit测试
- 人脸识别之特征脸方法(Eigenface)
- 批处理获取当前时间脚本
- 5-17 爬动的蠕虫 (15分)
- IOS_app源码
- MySQL 常用函数 加密函数
- JUnit 测试
- mybatis中insert操作获取id的操作
- 使用PullToRefresh时停止刷新方法失灵
- ABAP表控制Table Control设计
- java多线程简单操作和实际项目开发如何写
- japans的搭建(使用p12)
- Gridview各种易忘点总结
- iOS 打包 上架流程
- intellij idea+gitos/github