@Test(expected = RuntimeException.class) public void testRemoveNotExists() throws Exception { Role role = new Role(); role.setId(4); role.setName("role5"); roleDao.remove(role); }
@Test @ExpectedDatabase( table = "Role", value = "/dataset/role/afterRemove.xml", assertionMode = DatabaseAssertionMode.NON_STRICT) public void testRemove() throws Exception { roleDao.remove(roles[1]); }
@Test(expected = IllegalArgumentException.class) public void testRemoveWithNull() { roleDao.remove(null); }