Exemplo n.º 1
0
 @Test(expected = CanNotDeleteException.class)
 public void testDeleteS() {
   // 判断有异态的情况,如果有异态,则不能删除
   assertRowsCount(Operation.class, 5); // 业务删除
   assertRowsCount(OperationS.class, 3); // 业务删除
   operationService.delete(3L);
   assertRowsCount(Operation.class, 5); // 业务删除
   assertRowsCount(OperationS.class, 3); // 业务删除
 }
Exemplo n.º 2
0
 @Test(expected = CanNotDeleteException.class)
 public void testDelete() {
   // 其他信息不受影响,运行图级联删除,通路不变
   operationService.delete(2L);
   this.flushSessionAndCloseSessionAndNewASession();
   assertRowsCount(Program.class, 5); // 节目不受影响
   assertRowsCount(Operation.class, 4); // 业务删除
   assertRowsCount(OperationT.class, 0); // 业务删除
   assertRowsCount(Channel.class, 2); // 通路不受影响
   assertRowsCount(Schedule.class, 3);
 }
Exemplo n.º 3
0
 @Test(expected = CanNotDeleteException.class)
 public void testDeleteP2() {
   assertRowsCount(Operation.class, 5); // 业务删除
   operationService.delete(1L);
   assertRowsCount(Operation.class, 5); // 业务删除
 }