Ejemplo n.º 1
0
    public State run(Step step) {
      if (step instanceof ParameterisedStep) {
        ((ParameterisedStep) step).describeTo(reporter.get());
      }
      UUIDExceptionWrapper storyFailureIfItHappened = storyFailure.get();
      StepResult result = step.perform(storyFailureIfItHappened);
      result.describeTo(reporter.get());
      UUIDExceptionWrapper stepFailure = result.getFailure();
      if (stepFailure == null) {
        return this;
      }

      storyFailure.set(mostImportantOf(storyFailureIfItHappened, stepFailure));
      currentStrategy.set(strategyFor(storyFailure.get()));
      return new SomethingHappened(stepFailure);
    }
Ejemplo n.º 2
0
 public State run(Step step) {
   StepResult result = step.doNotPerform(scenarioFailure);
   result.describeTo(reporter.get());
   return this;
 }