Package org.jbehave.core.failures

Examples of org.jbehave.core.failures.FailingUponPendingStep


        OutputStream out = new ByteArrayOutputStream();
        EmbedderMonitor monitor = new PrintStreamEmbedderMonitor(new PrintStream(out));
        ViewGenerator viewGenerator = mock(ViewGenerator.class);

        Embedder embedder = embedderWith(runner, embedderControls, monitor);
        embedder.configuration().useViewGenerator(viewGenerator).usePendingStepStrategy(new FailingUponPendingStep());

        File outputDirectory = new File("target/output");
        List<String> formats = asList("html");
        Properties viewResources = new Properties();
        when(viewGenerator.getReportsCount()).thenReturn(new ReportsCount(2, 0, 1, 2, 0, 0, 1, 0));
View Full Code Here


*/
public class CoreStoriesFailingUponPending extends CoreStories {

  public Configuration configuration() {
    return super.configuration()          
          .usePendingStepStrategy(new FailingUponPendingStep());
  }
View Full Code Here

        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        Step pendingStep = mock(Step.class);
        StepResult pendingResult = pending("My step isn't defined!");
        when(pendingStep.perform(null)).thenReturn(pendingResult);
        PendingStepStrategy strategy = new FailingUponPendingStep();
        StepCollector collector = mock(StepCollector.class);
        CandidateSteps mySteps = new Steps();
        when(collector.collectScenarioSteps(eq(asList(mySteps)), (Scenario) anyObject(), eq(parameters))).thenReturn(
                asList(pendingStep));
        Story story = new Story(asList(new Scenario()));
View Full Code Here

   */
  public PendingStepStrategy pendingStepStrategy() {
    if (System.getProperty(FAIL_ON_PENDING) == null) {
      return super.pendingStepStrategy();
    }
    return new FailingUponPendingStep();
  }
View Full Code Here

   */
  public PendingStepStrategy pendingStepStrategy() {
    if (System.getProperty(FAIL_ON_PENDING) == null) {
      return super.pendingStepStrategy();
    }
    return new FailingUponPendingStep();
  }
View Full Code Here

public class EtsyDotComStories extends JUnitStories {

    public EtsyDotComStories() {

        PendingStepStrategy pendingStepStrategy = new FailingUponPendingStep();
        CrossReference crossReference = new SauceContextOutput.SauceLabsCrossReference(new HashMap<String, String>())
                .withJsonOnly().withOutputAfterEachStory(true).withPendingStepStrategy(pendingStepStrategy)
                .excludingStoriesWithNoExecutedScenarios(true);

        SeleniumContext seleniumContext = new SeleniumContext();
View Full Code Here

                .withCodeLocation(codeLocationFromClass(EtsyDotComStories.class)).withFailureTrace(true)
                .withFailureTraceCompression(true).withDefaultFormats().withFormats(formats)
                .withCrossReference(crossReference);

        Configuration configuration = injectedEmbedder().configuration();
        configuration.useFailureStrategy(new FailingUponPendingStep())
                .useStoryControls(new StoryControls().doResetStateBeforeScenario(false)).useStepMonitor(stepMonitor)
                .useStoryLoader(new LoadFromClasspath(EtsyDotComStories.class))
                .useStoryReporterBuilder(reporterBuilder);
        if (configuration instanceof SeleniumConfiguration) {
            SeleniumConfiguration seleniumConfiguration = (SeleniumConfiguration) configuration;
View Full Code Here

    protected Configuration createConfiguration() {
        final MostUsefulConfiguration config = (MostUsefulConfiguration) super
                .configuration();

        config.usePendingStepStrategy(new FailingUponPendingStep());
        config.storyReporterBuilder().withFormats(CONSOLE);

        return config;
    }
View Full Code Here

    @Ensures("result != null")
    protected Configuration createConfiguration() {
        final MostUsefulConfiguration config = (MostUsefulConfiguration) super
                .configuration();

        config.usePendingStepStrategy(new FailingUponPendingStep());
        config.storyReporterBuilder().withFormats(CONSOLE);

        return config;
    }
View Full Code Here

    protected Configuration createConfiguration() {
        final MostUsefulConfiguration config = (MostUsefulConfiguration) super
                .configuration();

        config.usePendingStepStrategy(new FailingUponPendingStep());
        config.storyReporterBuilder().withFormats(CONSOLE);

        return config;
    }
View Full Code Here

TOP

Related Classes of org.jbehave.core.failures.FailingUponPendingStep

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.