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