コード例 #1
0
 private static String unquote(String in) {
   StringBuffer result = new StringBuffer();
   for (int i = 0; i < in.length(); ++i) {
     char ch = in.charAt(i);
     if (ch == '\\') {
       ch = in.charAt(++i);
       switch (ch) {
         case 'n':
           result.append('\n');
           break;
         case 'r':
           result.append('\r');
           break;
         default:
           result.append(ch);
           break;
       }
     } else {
       result.append(ch);
     }
   }
   return result.toString();
 }
コード例 #2
0
  protected void assertStep(final BusinessProcessModel process, final String bean)
      throws InterruptedException {
    LOG.info("assertStep action = " + bean);

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

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

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

        assertNotNull(
            "No tasks found for bean " + bean + ", actions: " + found.toString(), processTaskModel);
      }

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