Hi,

This is my first experience of JBehave, I'm trying the two minute example and am
getting the following problems. Hopefully someone can give me guidance.

I have created the text file 'user_logs_in_successfully' as directed,

I have created UserLogsInSuccessfully.java ...

import org.jbehave.scenario.Scenario;
public class UserLogsInSuccessfully extends Scenario{
        public UserLogsInSuccessfully(){
                super(new LoginSteps());
        }
}

Eclipse complains that "The constructor Scenario(LoginSteps) is undefined" and
suggests that I "cast argument 'new LoginSteps()' to RunnableScenario

Also in LoginSteps.java
import static org.jbehave.Ensure.ensureThat;

import org.jbehave.scenario.steps.Steps;
import org.jbehave.scenario.annotations.Given;
import org.jbehave.scenario.annotations.When;
import org.jbehave.scenario.annotations.Then;

public class LoginSteps implements Steps {

        @Given("I am not Logged in")
        public void logout() {
                //currentPage.click("logout");
        }
        
        @When("I log in as $username with a password $password")
        public void logIn(String username,String password) {
                //currentPage.click("login");
        }
        
        @Then("I should see a message \"$message\"")
        public void checkMessage(String message) {
                ensureThat(message.equals("Wrong Message"));
        }
}

Eclipse complains that "The type Steps cannot be a superinterface of LoginSteps;
a superinterface must be an interface"

Any Ideas ?

Thanks in advance

Sean



---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to