Examples of StepFailureException


Examples of net.thucydides.core.steps.StepFailureException

    @Test
    public void the_acceptance_test_case_is_failing_if_a_test_step_failed() {

        testOutcome.recordStep(forASuccessfulTestStepCalled("Step 1"));
        testOutcome.recordStep(forABrokenTestStepCalled("Step 2", new StepFailureException("Oh bother",new AssertionError("Oh bother!"))));
        testOutcome.recordStep(forASuccessfulTestStepCalled("Step 4"));

        assertThat(testOutcome.getResult(), is(FAILURE));
    }
View Full Code Here

Examples of net.thucydides.core.steps.StepFailureException

    @Test
    public void the_acceptance_test_case_is_in_error_if_a_test_step_has_an_error() {

        testOutcome.recordStep(forASuccessfulTestStepCalled("Step 1"));
        testOutcome.recordStep(forABrokenTestStepCalled("Step 2", new StepFailureException("Oh bother",new NoSuchElementException("Can't find element"))));
        testOutcome.recordStep(forASuccessfulTestStepCalled("Step 4"));

        assertThat(testOutcome.getResult(), is(ERROR));
    }
View Full Code Here

Examples of net.thucydides.core.steps.StepFailureException

    }

    public void lastStepFailedWith(Throwable testFailureCause) {
        determineTestFailureCause(testFailureCause);
        TestStep lastTestStep = testSteps.get(testSteps.size() - 1);
        lastTestStep.failedWith(new StepFailureException(testFailureCause.getMessage(), testFailureCause));
    }
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.