@BeforeClass public static void setUpClass() { for (int i = 0; i < 10; i++) { com.renren.infra.xweb.entity.Test test = new com.renren.infra.xweb.entity.Test(); test.setMsg("" + i); testList.add(test); } }
@Test public void testInsert() { com.renren.infra.xweb.entity.Test test = new com.renren.infra.xweb.entity.Test(); test.setMsg("insert new test"); dao.insert(test); Assert.assertEquals(2, dao.findAll().size()); }
@Test public void testTest() { com.renren.infra.xweb.entity.Test test = dao.getTestById(1); Assert.assertEquals("test", test.getMsg()); }