If you can't get to work, please send us a zip of the source with the sample and let us know how you are trying to run it.
Cheers On 16/04/2010 09:23, Mauro Talevi wrote: > Works fine if you run the Scenario class and not the Steps one. > > Cheers > > > > On 15 Apr 2010, at 20:52, Rajiv Abraham > <[email protected] > <mailto:[email protected]>> wrote: > >> 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 >> --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
