コード例 #1
0
ファイル: ProcessFlowTest.java プロジェクト: cbarath/custom
  @After
  public void resetServices() {
    final List<TaskModel> tasks = taskServiceStub.cleanup();
    final StringBuffer msg = new StringBuffer();
    for (final TaskModel task : tasks) {
      final ProcessTaskModel processTask = (ProcessTaskModel) task;

      msg.append(processTask.getAction()).append(", ");
    }
  }
コード例 #2
0
  @After
  public void resetServices() {
    final List<TaskModel> tasks = taskServiceStub.cleanup();
    final StringBuffer msg = new StringBuffer();
    for (final TaskModel task : tasks) {
      final ProcessTaskModel processTask = (ProcessTaskModel) task;

      msg.append(processTask.getAction()).append(", ");
    }

    assertTrue("tasks should be empty after test execution. Left: " + msg, tasks.isEmpty());
  }
コード例 #3
0
ファイル: ProcessFlowTest.java プロジェクト: cbarath/custom
  protected void assertStep(final BusinessProcessModel process, final String bean)
      throws InterruptedException {
    LOG.info("assertStep action = " + bean);

    try {
      final ProcessTaskModel processTaskModel = taskServiceStub.runProcessTask(bean);

      if (processTaskModel == null) {
        final StringBuffer found = new StringBuffer();

        for (final TaskModel task : taskServiceStub.getTasks()) {
          if (task instanceof ProcessTaskModel) {
            found.append(((ProcessTaskModel) task).getAction()).append("; ");
          }
        }

        assertNotNull("No task found for bean " + bean + ", action(s): " + found, processTaskModel);
      }

    } catch (final RetryLaterException e) {
      fail(e.toString());
    }
  }