Package org.moresbycoffee.mbyhave8

Examples of org.moresbycoffee.mbyhave8.MByHaveSpec.execute()


        final Step andStep = new MByHaveSpec() {
            Step innerStep = and("an And step", () -> { visited.set(true); return StepResult.Success; });
        }.innerStep;

        final StepOutput result = andStep.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Success, result.getResult());
        assertTrue("The and step execution should execute the step implementation and change the visited flag", visited.get());
    }
View Full Code Here


        final Step andStep = new MByHaveSpec() {
            Step innerStep = and("an And step", () -> visited.set(true));
        }.innerStep;

        final StepOutput result = andStep.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Success, result.getResult());
        assertTrue("The and step execution should execute the step implementation and change the visited flag", visited.get());
    }
View Full Code Here

    public void implementationLess_and_step_should_return_pending_state() {
        final Step step = new MByHaveSpec() {
            Step innerStep = and("Implementationless Step");
        }.innerStep;

        final StepOutput stepOutput = step.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Pending, stepOutput.getResult());
    }

}
View Full Code Here

    public void implementationLess_given_step_should_return_pending_state() {
        final Step step = new MByHaveSpec() {
            Step innerStep = given("Implementationless Step");
        }.innerStep;

        final StepOutput stepOutput = step.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Pending, stepOutput.getResult());
    }

}
View Full Code Here

    public void implementationLess_when_step_should_return_pending_state() {
        final Step step = new MByHaveSpec() {
            Step innerStep = when("Implementationless Step");
        }.innerStep;

        final StepOutput stepOutput = step.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Pending, stepOutput.getResult());
    }

}
View Full Code Here

    public void implementationLess_then_step_should_return_pending_state() {
        final Step step = new MByHaveSpec() {
            Step innerStep = then("Implementationless Step");
        }.innerStep;

        final StepOutput stepOutput = step.execute(DummyStepHooks.DUMMY);

        assertEquals(StepResult.Pending, stepOutput.getResult());
    }

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