Hi,

I wanted my scenario to fail using ensureThat(false) statement in my method
following the @Then tag

I have....

-    a scenario named hey_hey_my_my ( the scenario is displayed in the
console on test execution)

-    a class HeyHeyMyMy.java (in the same folder as hey_hey_my_my) which
executes the following PlayTabSteps.java.

-    IDE: Eclipse

* *

*public* *class* PlayTabSteps *extends* Steps {



*    private* Tab tab;

    *private* Guitar guitar;



      @Given("tab $asciiTab")

      *public* *void* tab(String asciiTab) {

            tab = *new* Tab(asciiTab, *new* TabParser());



      }



    @When("the guitar plays")

    *public* *void* guitarPlays() {

        guitar = *new* Guitar();

          guitar.play(tab);



    }



    @Then("the following notes will be played $notes")

    *public* *void* theFollowingNotesWillBePlayed(String notes) {

           *ensureThat*(*false*);



    }



}

*public* *class* HeyHeyMyMy *extends* Scenario {



    @SuppressWarnings(*"unchecked"*)

      *public* HeyHeyMyMy() {

       *super*(*new* PlayTabSteps());



      }

}



But my  test theFollowingNotesWillBePlayed() does not fail.

Can someone guide towards where I am going wrong?

Thanks,

Rajiv

Reply via email to