Nino Saturnino Martinez Vazquez Wael wrote:
Hi Guys
Hi
I've just started looking at jbehave. It looks really cool:)
I am also new here - we've just started looking at jbehave at work
But I am having some troubles, my scenarios just passes even if they
should fail, I can see that they are not picking up my steps:
my steps class:
@Given("when a user visits %page")
public void visits(WebPage page) {
wicketTester.startPage(page.getClass());
}
@Then("%page are rendered")
public void seesPage(WebPage page) {
wicketTester.assertRenderedPage(page.getClass());
}
my scenario (user_visits_pages.scenario) :
when a user visits homePage
errorPage are rendered
my scenario class (UserVisitsPages.java)
public class UserVisitsPages extends JUnitScenario {
public UserVisitsPages() {
this(Thread.currentThread().getContextClassLoader());
}
public UserVisitsPages(final ClassLoader classLoader) {
super(new PropertyBasedConfiguration() {
public ScenarioDefiner forDefiningScenarios() {
return new ClasspathScenarioDefiner(new
UnderscoredCamelCaseResolver(".scenario"), new
PatternScenarioParser(this), classLoader);
}
}, new MyProjectSteps(classLoader));
}
}
you've annotated a method as @Given but written the word "When" in your
scenario file. I think it should look like @When("a user visits
$page"). (I've not seen '%' for the place holders, just '$' - but that
may work fine)
--
Ed Bowler <[EMAIL PROTECTED]>
http://rockshore.net
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email