如题

解决方案 »

  1.   

    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);
    }}