@Test public void testList() { StudentDao studentDao = new StudentDao(); List stuList = studentDao.list("John"); assertEquals(1, stuList.size()); assertEquals("John", stuList.get(0).getSname()); }

Override public ListStudent listString sname ListStudent stuList = DBUtilqueryTableselect from Student where sname= Studentclass sname; return stuList; 写出上面的测试类