Examples of storyReporter()


Examples of org.jbehave.core.configuration.Configuration.storyReporter()

            storyPaths.add(storyPath);
            Story story = mockStory(Meta.EMPTY);
            when(story.getMeta()).thenReturn(meta);
            stories.put(storyPath, story);
            when(runner.storyOfPath(configuration, storyPath)).thenReturn(story);
            assertThat(configuration.storyReporter(storyPath), sameInstance(storyReporter));
        }

        // When
        MetaFilter filter = mock(MetaFilter.class);
        when(filter.allow(meta)).thenReturn(false);
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.storyReporter()

    public void shouldReportStoryCancellation(){
        // Given
        Configuration configuration = mock(Configuration.class,Mockito.RETURNS_DEEP_STUBS);
        when(configuration.storyControls().dryRun()).thenReturn(false);
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        when(configuration.storyReporter(Matchers.anyString())).thenReturn(reporter);
       
        Story story = mock(Story.class);
        String storyPath = "story/path";
        when(story.getPath()).thenReturn(storyPath);
        RuntimeException expected = new RuntimeException();
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.storyReporter()

    }

    private StoryReporter reporterFor(RunContext context, Story story) {
        Configuration configuration = context.configuration();
        if (context.givenStory()) {
            return configuration.storyReporter(reporterStoryPath.get());
        } else {
            // store parent story path for reporting
            reporterStoryPath.set(story.getPath());
            return configuration.storyReporter(reporterStoryPath.get());
        }
View Full Code Here

Examples of org.jbehave.core.configuration.Configuration.storyReporter()

        if (context.givenStory()) {
            return configuration.storyReporter(reporterStoryPath.get());
        } else {
            // store parent story path for reporting
            reporterStoryPath.set(story.getPath());
            return configuration.storyReporter(reporterStoryPath.get());
        }
    }

    private void handleStoryFailureByStrategy() throws Throwable {
        Throwable throwable = storyFailure.get();
View Full Code Here

Examples of org.jbehave.core.configuration.MostUsefulConfiguration.storyReporter()

            String storyPath = resolver.resolve(embeddable);
            storyPaths.add(storyPath);
            Story story = mockStory(Meta.EMPTY);
            stories.put(storyPath, story);
            when(runner.storyOfPath(configuration, storyPath)).thenReturn(story);
            assertThat(configuration.storyReporter(storyPath), sameInstance(storyReporter));
        }

        // When
        embedder.runStoriesAsPaths(storyPaths);
View Full Code Here

Examples of org.jbehave.core.configuration.MostUsefulConfiguration.storyReporter()

            storyPaths.add(storyPath);
            Story story = mockStory(Meta.EMPTY);
            when(story.getMeta()).thenReturn(meta);
            stories.put(storyPath, story);
            when(runner.storyOfPath(configuration, storyPath)).thenReturn(story);
            assertThat(configuration.storyReporter(storyPath), sameInstance(storyReporter));
        }

        // When
        MetaFilter filter = mock(MetaFilter.class);
        when(filter.allow(meta)).thenReturn(false);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.