1. package demoproject.demoproject.jbehave;
  2. import net.thucydides.core.annotations.Steps;
  3. import org.jbehave.core.annotations.Given;
  4. import org.jbehave.core.annotations.Then;
  5. import org.jbehave.core.annotations.When;
  6. import demoproject.demoproject.steps.EndUserSteps;
  7. public class DefinitionSteps {
  8. @Steps
  9. EndUserSteps endUser;
  10. @Given("the user is on the Wikionary home page")
  11. public void givenTheUserIsOnTheWikionaryHomePage() {
  12. endUser.is_the_home_page();
  13. }
  14. @When("the user looks up the definition of the word '$word'")
  15. public void whenTheUserLooksUpTheDefinitionOf(String word) {
  16. endUser.looks_for(word);
  17. }
  18. @Then("they should see the definition '$definition'")
  19. public void thenTheyShouldSeeADefinitionContainingTheWords(String definition) {
  20. endUser.should_see_definition(definition);
  21. }
  22. }