Package org.jbehave.core.reporters
Class StepFailureDecorator
- java.lang.Object
-
- org.jbehave.core.reporters.DelegatingStoryReporter
-
- org.jbehave.core.reporters.StepFailureDecorator
-
- All Implemented Interfaces:
StoryReporter
public class StepFailureDecorator extends DelegatingStoryReporter
When a step fails, the
Throwable
that caused the failure is wrapped in aStepFailed
together with the step during which the failure occurred. If such a failure occurs it will throw theStepFailed
after the story is finished.- See Also:
StepFailed
-
-
Constructor Summary
Constructors Constructor Description StepFailureDecorator(StoryReporter delegate)
-
Method Summary
Modifier and Type Method Description void
afterStory(boolean givenStory)
void
beforeStory(Story story, boolean givenStory)
void
failed(String step, Throwable cause)
void
failedOutcomes(String step, OutcomesTable table)
-
Methods inherited from class org.jbehave.core.reporters.DelegatingStoryReporter
afterComposedSteps, afterExamples, afterGivenStories, afterScenario, afterScenarios, afterScenarioSteps, afterStoriesSteps, afterStorySteps, beforeComposedSteps, beforeExamples, beforeGivenStories, beforeScenario, beforeScenarios, beforeScenarioSteps, beforeStep, beforeStoriesSteps, beforeStorySteps, comment, dryRun, example, getDelegates, givenStories, givenStories, ignorable, lifecycle, narrative, notPerformed, pending, pending, pendingMethods, restarted, restartedStory, scenarioExcluded, storyCancelled, storyExcluded, successful, toString
-
-
-
-
Constructor Detail
-
StepFailureDecorator
public StepFailureDecorator(StoryReporter delegate)
-
-
Method Detail
-
afterStory
public void afterStory(boolean givenStory)
- Specified by:
afterStory
in interfaceStoryReporter
- Overrides:
afterStory
in classDelegatingStoryReporter
-
beforeStory
public void beforeStory(Story story, boolean givenStory)
- Specified by:
beforeStory
in interfaceStoryReporter
- Overrides:
beforeStory
in classDelegatingStoryReporter
-
failed
public void failed(String step, Throwable cause)
- Specified by:
failed
in interfaceStoryReporter
- Overrides:
failed
in classDelegatingStoryReporter
-
failedOutcomes
public void failedOutcomes(String step, OutcomesTable table)
- Specified by:
failedOutcomes
in interfaceStoryReporter
- Overrides:
failedOutcomes
in classDelegatingStoryReporter
-
-