JUnit是个好东东,简单好用。
选中想测试的目标对象类,选择new-->JUNIT-test-case 生成测试类,简单补充,就可以测试了。
public class MpwdProtectionDaoTest {
private static ApplicationContext act=null;
@Before
public void setUp() throws Exception {
String[]files=new String[]{"applicationContext-resource.xml",
"applicationContext-service.xml",
"applicationContext-dao.xml",};
act=new ClassPathXmlApplicationContext(files);
}
//@Test
public void testSaveOrUpdate() {
MpwdProtectionManager mpwdsrv=(MpwdProtectionManager)act.getBean("mpwdProtectionManager");
MpwdProtection mpwd=new MpwdProtection();
mpwd.setCreateTime(new Timestamp(System.currentTimeMillis()));
mpwd.setUserId((long)29);
mpwd.setProtectionEmail("fsh430623@163.com");
mpwdsrv.saveOrUpdate(mpwd);
}
@Test
public void testSave() {
MpwdProtectionManager mpwdsrv=(MpwdProtectionManager)act.getBean("mpwdProtectionManager");
MpwdProtection mpwd=new MpwdProtection();
mpwd.setCreateTime(new Timestamp(System.currentTimeMillis()));
mpwd.setUserId((long)29);
mpwd.setProtectionEmail("fsh430623@163.com");
mpwdsrv.save(mpwd);
}
}
分享到:
相关推荐
JUnit 5 = JUnit Platform + JUnit Jupiter + JUnit Vintage,包含依赖包:junit-jupiter-5.5.1.jar,junit-jupiter-engine-5.5.1.jar,junit-jupiter-params-5.5.1.jar,junit-platform-launcher-1.5.1.jar,junit-...
junit4.1junit4.1junit4.1junit4.1junit4.1
Files contained in junit4-4.8.2.jar: LICENSE.txt META-INF/MANIFEST.MF junit.extensions.ActiveTestSuite.class junit.extensions.RepeatedTest.class junit.extensions.TestDecorator.class junit.extensions...
JUNIT介绍.JUNIT介绍.JUNIT介绍.JUNIT介绍.
JUnit API JUnit API JUnit API JUnit API JUnit API
Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验Junit入门实验
关于junit的介绍 关于关于junit的介绍关于junit的介绍关于junit的介绍关于junit的介绍关于junit的介绍关于junit的介绍
JUnit讲课文档JUnit讲课文档JUnit讲课文档JUnit讲课文档JUnit讲课文档JUnit讲课文档JUnit讲课文档
赠送jar包:junit-4.12.jar; 赠送原API文档:junit-4.12-javadoc.jar; 赠送源代码:junit-4.12-sources.jar; 包含翻译后的API文档:junit-4.12-javadoc-API文档-中文(简体)版.zip 对应Maven信息:groupId:...
junit3 junit4 api,单元测试的利器
这个好用,junit,junit,junit
JUnit in Action 中文版英文版 JUnit Recipies好书哦!
JUnit4
junit4的jar包,使用annotation进行junit测试!
junit5.jar
赠送jar包:junit-4.13.2.jar; 赠送原API文档:junit-4.13.2-javadoc.jar; 赠送源代码:junit-4.13.2-sources.jar; 赠送Maven依赖信息文件:junit-4.13.2.pom; 包含翻译后的API文档:junit-4.13.2-javadoc-API...
Junit5.7.2 离线jar
JUnit学习资料
junit安装,告诉读者如何安装junit;junit安装,告诉读者如何安装junit;junit安装,告诉读者如何安装junit;junit安装,告诉读者如何安装junit;junit安装,告诉读者如何安装junit;junit安装,告诉读者如何安装junit;
junit3.8 和junit4 api