示例#1
0
  /**
   * 生成任务详细信息测试数据
   *
   * @param result 处理结果
   */
  private TaskDetail generateTaskDetail(String result) {
    TaskDetail taskDetail = new TaskDetail();
    taskDetail.setResult(result);
    taskDetail.setProcess(result);

    return taskDetail;
  }
示例#2
0
  /** 测试根据任务ID取得该任务的详细信息 */
  public void testGetTaskDetailOfTask() {
    Task task = generateTask("测试任务及详细");
    TaskDetail taskDetail = generateTaskDetail("测试任务明细");
    taskDetail.setTask(task);
    taskDetail.setDept(county);
    taskManager.save(task);
    taskManager.getDao().save(taskDetail);
    TaskDetail taskDetailRst = reportManager.getTaskDetailOfTask(task.getId(), county.getId());

    assertNotNull(taskDetailRst);
  }
示例#3
0
  /** 测试删除上报事件及相关任务 */
  public void testRemoveCase() {
    FsCase fsCase = generateFsCase("测试事件", county);
    Task task = generateTask("测试任务");
    TaskDetail taskDetail = generateTaskDetail("测试任务处理结果");
    task.setFsCase(fsCase);
    taskDetail.setTask(task);
    fsCaseManager.save(fsCase);
    taskManager.save(task);
    taskManager.getDao().save(taskDetail);
    reportManager.removeCase(fsCase.getId());

    assertNull(fsCaseManager.get(fsCase.getId()));
  }