Package org.jbehave.core.model.OutcomesTable

Examples of org.jbehave.core.model.OutcomesTable.OutcomesFailed


        // add a non-failed outcome
        table.addOutcome("a failure", two, is(false));
        try {
            table.verify();
        } catch (UUIDExceptionWrapper ce) {
            OutcomesFailed e = (OutcomesFailed) ce.getCause();
            assertThat(e.outcomesTable().getOutcomes().size(), equalTo(2));
            List<Outcome<?>> failedOutcomes = e.outcomesTable().getFailedOutcomes();
            assertThat(failedOutcomes.size(), equalTo(1));
            Outcome<?> outcome = failedOutcomes.get(0);
            assertThat(outcome.getDescription(), equalTo("a failure"));
            assertThat((Boolean) outcome.getValue(), is(true));
        }
View Full Code Here


        String failed = "And any errors should appear at the end of the story";
        UUIDExceptionWrapper cause = new UUIDExceptionWrapper(new IllegalStateException());
        failed(failed, cause).describeTo(reporter);
        String failedOutcomes = "And outcomes failed";
        OutcomesTable outcomesTable = new OutcomesTable();
        failed(failedOutcomes, new UUIDExceptionWrapper(new OutcomesFailed(outcomesTable))).describeTo(reporter);
        skipped().describeTo(reporter);

        // Then
        verify(reporter).successful(successful);
        verify(reporter, times(2)).pending(pending);
View Full Code Here

TOP

Related Classes of org.jbehave.core.model.OutcomesTable.OutcomesFailed

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.