Examples of ScenarioOutput


Examples of org.moresbycoffee.mbyhave8.result.ScenarioOutput

                    given("given step", (VoidStepImplementation) () -> { throw new AssertionError(); }),
                    when("when step", () -> { isWhenVisited.set(true); }),
                    then("then step", () -> { isThenVisited.set(true); }));
        }.scenario;

        final ScenarioOutput output = scenario.execute(DummyScenarioHooks.DUMMY);

        assertFalse("The when step should not run", isWhenVisited.get());
        assertFalse("The then step should not run", isThenVisited.get());

        assertEquals(ScenarioResult.Failure, output.getResult());
        assertThat("The Given step should fail", output.getSteps().get(0).getResult(), instanceOf(StepResult.Failure.class));
        assertThat("The When step should be skipped", output.getSteps().get(1).getResult(), instanceOf(StepResult.Skipped.class));
        assertThat("The Then step should be skipped", output.getSteps().get(1).getResult(), instanceOf(StepResult.Skipped.class));

    }
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.