Package org.jbehave.core

Examples of org.jbehave.core.Block


   
    public void shouldThrowIllegalStateExceptionIfRunBeforeSpecified() throws Exception {
        final Scenario scenario = new MultiStepScenario(){
            public void specifySteps() {}};
           
        Exception exception = runAndCatch(IllegalStateException.class, new Block() {
            public void run() throws Exception {
                scenario.run((World)stub(World.class));
            }
        });
       
View Full Code Here


    public void shouldThrowIllegalStateExceptionIfNarratedBeforeSpecified() throws Exception {
        final Scenario scenario = new MultiStepScenario(){
            public void specifySteps() {}};
           
        Exception exception = runAndCatch(IllegalStateException.class, new Block() {
            public void run() throws Exception {
                scenario.narrateTo((Renderer)stub(Renderer.class));
            }
        });
       
View Full Code Here

        final Scenario scenario = new MultiStepScenario(){
            public void specifySteps() {
                given((Given) given);
            }};
           
        Exception exception = runAndCatch(VerificationException.class, new Block() {
            public void run() throws Exception {
                scenario.specify();
                scenario.run((World)stub(World.class));
            }
        });
View Full Code Here

        final Scenario scenario = new MultiStepScenario(){
            public void specifySteps() {
                given((Given) given);
            }};
           
        Exception exception = runAndCatch(VerificationException.class, new Block() {
            public void run() throws Exception {
                scenario.specify();
                scenario.run((World)stub(World.class));
            }
        });
View Full Code Here

   
    public void shouldFailIfSpecifiedTwice() throws Exception {
        final Scenario scenario = new MultiStepScenario(){
            public void specifySteps() {}};
           
        Exception exception = runAndCatch(IllegalStateException.class, new Block() {
            public void run() throws Exception {
                scenario.specify();
                scenario.specify();
            }
        });
View Full Code Here

TOP

Related Classes of org.jbehave.core.Block

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.