有谁知道如何用junit调试 struts2+spring 如题 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 import static org.junit.Assert.assertNotNull;import java.util.List;import org.junit.Test;import org.springframework.beans.factory.BeanFactory;import org.springframework.context.support.ClassPathXmlApplicationContext;import com.om.common.ParamsContext;import com.om.web.views.OrgEmplopees;public class QueryDAOTest { private static BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext-*.xml"); QueryDAO queryDao = (QueryDAO)factory.getBean("queryDAO"); @Test public void testGetOrgsEmps() { ParamsContext pcn= new ParamsContext(); pcn.setAccName("888"); List lst=queryDao.getOrgEmps(pcn); for (int i = 0; i < lst.size(); i++) { Object[] res=(Object[])lst.get(i); for (int j = 0; j < res.length; j++) { System.out.print(res[j]); } System.out.println(""); } } @Test public void testGetOrgEmplopees() { ParamsContext pcn= new ParamsContext(); pcn.setAccName("888"); List<OrgEmplopees> lst=queryDao.getOrgsEmps(pcn); for(OrgEmplopees re : lst) { for (int i = 0; i < re.getEmplopees().size(); i++) { Object[] res=(Object[])re.getEmplopees().get(i); for (int j = 0; j < res.length; j++) { System.out.print(res[j]); } System.out.println(""); } } } @Test public void GetActionForward() { String lst=queryDao.GetActionForward("3", "888"); System.out.println(lst); }} 用commons-fileupload包上传文件成功,却抱异常 sun.io.MalformedInputException jsp与sql server2005 配置了Spring的事物后出错 hibernate的插入批处理问题 程序不规律的报错(第一次点击错误,第二次点击错误小时),请分析一下错误原因(内含错误) hibernate,jdbc 批量处理问题 请教,如何判断一个安装程序已经被启动 最近事真多﹐新問題又產生了﹗ 写好了一个实体BEAN,已经发布成功,如何在JSP中调用? 关于配置oracle客户端的问题 Java单元测试 JUnit 4.8.1 发布
import org.springframework.beans.factory.BeanFactory;
import org.springframework.context.support.ClassPathXmlApplicationContext;import com.om.common.ParamsContext;
import com.om.web.views.OrgEmplopees;public class QueryDAOTest {
private static BeanFactory factory = new ClassPathXmlApplicationContext("applicationContext-*.xml");
QueryDAO queryDao = (QueryDAO)factory.getBean("queryDAO");
@Test
public void testGetOrgsEmps() {
ParamsContext pcn= new ParamsContext();
pcn.setAccName("888");
List lst=queryDao.getOrgEmps(pcn);
for (int i = 0; i < lst.size(); i++) {
Object[] res=(Object[])lst.get(i);
for (int j = 0; j < res.length; j++) {
System.out.print(res[j]);
}
System.out.println("");
}
}
@Test
public void testGetOrgEmplopees() {
ParamsContext pcn= new ParamsContext();
pcn.setAccName("888");
List<OrgEmplopees> lst=queryDao.getOrgsEmps(pcn);
for(OrgEmplopees re : lst)
{
for (int i = 0; i < re.getEmplopees().size(); i++) {
Object[] res=(Object[])re.getEmplopees().get(i);
for (int j = 0; j < res.length; j++) {
System.out.print(res[j]);
}
System.out.println("");
}
}
}
@Test
public void GetActionForward() {
String lst=queryDao.GetActionForward("3", "888");
System.out.println(lst);
}}