コード例 #1
0
 private void handleFailurePrinting(final BehaviorStep currentStep) {
   for (BehaviorStep step : currentStep.getChildSteps()) {
     if (recurseErrorStepTypes.contains(step.getStepType())) {
       handleFailurePrinting(step);
     } else {
       printFailureMessage(step);
     }
   }
 }
コード例 #2
0
  private void printFailureMessage(final BehaviorStep istep) {

    if (istep.getResult() != null && istep.getResult().failed()) {
      System.out.println(
          "\t"
              + istep.getParentStep().getStepType().type()
              + " \""
              + istep.getParentStep().getName()
              + "\"");
      System.out.println(
          "\tstep "
              + istep.getStepType().toString()
              + " \""
              + istep.getName()
              + "\" -- "
              + (istep.getResult().cause() != null
                  ? istep.getResult().cause().getMessage()
                  : istep.getResult().description));
    }
  }