Package org.jbehave.core.reporters

Examples of org.jbehave.core.reporters.StoryReporter


    @Test
    public void shouldRunAfterAndBeforeScenarioSteps() throws Throwable{
        // Given
        Scenario scenario1 = new Scenario("my title 1", Meta.EMPTY, GivenStories.EMPTY, ExamplesTable.EMPTY, asList("step"));
        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1));
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        Configuration configuration = configurationWith(reporter, collector, failureStrategy);
        configuration.storyControls().doDryRun(true);
        CandidateSteps mySteps = new Steps(configuration);
View Full Code Here


        Story story = new Story(new Description("my blurb"), Narrative.EMPTY, asList(scenario1,
                scenario2, scenario3));
        Step step = mock(Step.class);
        StepResult result = mock(StepResult.class, "result");
        when(step.perform(null)).thenReturn(result);
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        Configuration configuration = configurationWith(reporter, collector, failureStrategy);
        configuration.doDryRun(true);
        CandidateSteps mySteps = new Steps(configuration);
View Full Code Here

    }

    @Test
    public void shouldNotRunStoriesNotAllowedByFilter() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy strategy = mock(FailureStrategy.class);
        CandidateSteps mySteps = new Steps();
        when(collector.collectScenarioSteps(eq(asList(mySteps)), (Scenario) anyObject(), eq(parameters))).thenReturn(
                Arrays.<Step>asList());
View Full Code Here

    }
   
    @Test
    public void shouldNotRunStoriesNotAllowedByFilterOnStoryElement() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy strategy = mock(FailureStrategy.class);
        CandidateSteps mySteps = new Steps();
        when(collector.collectScenarioSteps(eq(asList(mySteps)), (Scenario) anyObject(), eq(parameters))).thenReturn(
                Arrays.<Step>asList());
View Full Code Here

    }
   
    @Test
    public void shouldNotRunScenariosNotAllowedByFilter() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy strategy = mock(FailureStrategy.class);
        CandidateSteps mySteps = new Steps();
        when(collector.collectScenarioSteps(eq(asList(mySteps)), (Scenario) anyObject(), eq(parameters))).thenReturn(
                Arrays.<Step>asList());
View Full Code Here

    }

    @Test
    public void shouldNotRunScenariosNotAllowedByFilterOnScenarioElement() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        StepCollector collector = mock(StepCollector.class);
        FailureStrategy strategy = mock(FailureStrategy.class);
        CandidateSteps mySteps = new Steps();
        when(collector.collectScenarioSteps(eq(asList(mySteps)), (Scenario) anyObject(), eq(parameters))).thenReturn(
                Arrays.<Step>asList());
View Full Code Here

   * if the stories fail.
   * </p>
   * @deprecated Use StoryReporterBuilder()
   */
  public StoryReporter defaultStoryReporter() {
    StoryReporter storyReporter = super.defaultStoryReporter();
    if (System.getProperty(SILENT_SUCCESS) == null) {
      return storyReporter;
    } else {
      return new SilentSuccessFilter(storyReporter);
    }
View Full Code Here

    public StoryReporter defaultStoryReporter() {
        return defaultStoryReporter;
    }

    public StoryReporter storyReporter(String storyPath) {
        StoryReporter storyReporter = storyReporters.get(storyPath);
        if (storyReporter != null) {
            return storyReporter;
        }
        // fall back on default story reporter
        return defaultStoryReporter();
View Full Code Here

   * Setting {@link #SILENT_SUCCESS} will only show the steps for all stories
   * if the stories fail.
   * </p>
   */
  public StoryReporter defaultStoryReporter() {
    StoryReporter storyReporter = super.defaultStoryReporter();
    if (System.getProperty(SILENT_SUCCESS) == null) {
      return storyReporter;
    } else {
      return new SilentSuccessFilter(storyReporter);
    }
View Full Code Here

public class StepResultBehaviour {
   
    @Test
    public void shouldDescribeResultToReporter() {
        // Given
        StoryReporter reporter = mock(StoryReporter.class);

        // When
        String successful = "Given that a step is pending or failing";
        successful(successful).describeTo(reporter);
        String pending = "When a step is performed";
View Full Code Here

TOP

Related Classes of org.jbehave.core.reporters.StoryReporter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.