Examples of UUIDExceptionWrapper


Examples of org.jbehave.core.failures.UUIDExceptionWrapper

        StoryReporter delegate = mock(StoryReporter.class);
        DelegatingStoryReporter delegator = new DelegatingStoryReporter(delegate);
        List<String> givenStoryPaths = asList("path/to/story1", "path/to/story2");
        GivenStories givenStories = new GivenStories(StringUtils.join(givenStoryPaths, ","));
        ExamplesTable examplesTable = new ExamplesTable("|one|two|\n|1|2|\n");
        UUIDExceptionWrapper anException = new UUIDExceptionWrapper(new IllegalArgumentException());
        Story story = new Story();
        boolean givenStory = false;
        Scenario scenario = new Scenario();
        String filter = "-some property";
       
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

    public void shouldReportAnyFailuresAndHandleThemAfterStory() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        Step firstStepExceptional = mock(Step.class);
        Step secondStepNotPerformed = mock(Step.class);
        StepResult failed = failed("When I fail", new UUIDExceptionWrapper(new IllegalStateException()));
        StepResult notPerformed = notPerformed("Then I should not be performed");
        when(firstStepExceptional.perform(null)).thenReturn(failed);
        when(secondStepNotPerformed.doNotPerform(Matchers.<UUIDExceptionWrapper>any())).thenReturn(notPerformed);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        StepCollector collector = mock(StepCollector.class);
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

    public void shouldAllowToSkipScenariosAfterFailedScenario() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        Step failedStep = mock(Step.class);
        Step neverExecutedStep = mock(Step.class);
        StepResult failed = failed("When I fail", new UUIDExceptionWrapper(new IllegalStateException()));
        when(failedStep.perform(null)).thenReturn(failed);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        StepCollector collector = mock(StepCollector.class);
        CandidateSteps mySteps = new Steps();
        Scenario scenario1 = new Scenario();
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

    @Test
    public void shouldAllowToNotResetStateBeforeStory() throws Throwable {
        // Given
        StoryReporter reporter = mock(ConcurrentStoryReporter.class);
        Step failedStep = mock(Step.class, "failedStep");
        when(failedStep.perform(null)).thenReturn(failed("before stories", new UUIDExceptionWrapper(new RuntimeException("BeforeStories fail"))));
        Step pendingStep = mock(Step.class, "pendingStep");
        when(pendingStep.perform(null)).thenReturn(pending("pendingStep"));
        StepCollector collector = mock(StepCollector.class);
        CandidateSteps mySteps = new Steps();       
        Scenario scenario1 = new Scenario();
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

        StepCollector collector = mock(StepCollector.class);
        FailureStrategy failureStrategy = mock(FailureStrategy.class);
        Configuration configuration = configurationWith(reporter, collector, failureStrategy);
        configuration.doDryRun(true);
        CandidateSteps mySteps = new Steps(configuration);
        UUIDExceptionWrapper failure = new UUIDExceptionWrapper(new IllegalArgumentException());
        Step successfulStep = mockSuccessfulStep("successfulStep");
        Step pendingStep = mock(Step.class, "pendingStep");
        Step failingStep = mock(Step.class, "failingStep");
        when(pendingStep.perform(Matchers.<UUIDExceptionWrapper>any())).thenReturn(pending("pendingStep"));
        when(pendingStep.doNotPerform(failure)).thenReturn(pending("pendingStep"));
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

    }

    @Test
    public void UUIDExecptionShouldBeUnwrapped() {
        Exception ex=new Exception();
        Exception wrapEx=new UUIDExceptionWrapper(ex);

        StackTraceFormatter formatter = new StackTraceFormatter(false);
        assertTrue("UUIDException is not unwrapped", formatter.stackTrace(wrapEx).equals(formatter.stackTrace(ex)));
    }
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

            }
        };

        // When
        StoryReporter reporter = builder.withDefaultFormats().withFormats(TXT).withKeywords(keywords).build(storyPath);
        reporter.failed("Dato un passo che fallisce", new UUIDExceptionWrapper(new RuntimeException("ouch")));

        ((ConcurrentStoryReporter) reporter).invokeDelayed();

        // Then
        assertThat(builder.keywords(), equalTo(keywords));
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

                failed = true;
                break;
            }
        }
        if (failed) {
            failureCause = new UUIDExceptionWrapper(new OutcomesFailed(this));
            throw failureCause;
        }
    }
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

        }
        try {
            runStepsWhileKeepingState(context,
                    configuration.stepCollector().collectBeforeOrAfterStoriesSteps(context.candidateSteps(), stage));
        } catch (InterruptedException e) {
            throw new UUIDExceptionWrapper(e);
        }
        reporter.get().afterStory(false);
        storiesState.set(context.state());
        // if we are running with multiple threads, call delayed
        // methods, otherwise we will forget to close files on BeforeStories
View Full Code Here

Examples of org.jbehave.core.failures.UUIDExceptionWrapper

                    meta);

            try {
                methodInvoker.invoke();
            } catch (InvocationTargetException e) {
                return failed(method, new UUIDExceptionWrapper(new BeforeOrAfterFailed(method, e.getCause())));
            } catch (Throwable t) {
                return failed(method, new UUIDExceptionWrapper(new BeforeOrAfterFailed(method, t)));
            }

            return skipped();
        }
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.