Ejemplo n.º 1
0
 @Then("^Am I hungry\\? \"([^\"]*)\"$")
 public void amIHungry(String hungry) {
   assertEquals(belly.isHungry(), Boolean.parseBoolean(hungry));
 }
Ejemplo n.º 2
0
 @When("^I eat (\\d+) cukes$")
 public void eatCukes(int cukes) {
   belly.setCukes((belly.getCukes() - cukes));
 }
Ejemplo n.º 3
0
 @Given("^I have (\\d+) cukes$")
 public void haveCukes(int cukes) {
   belly.setCukes(cukes);
 }
Ejemplo n.º 4
0
 @Given("^I have (\\d+) cukes in my belly$")
 public void I_have_cukes_in_my_belly(int cukes) throws Throwable {
   Belly belly = new Belly();
   belly.eat(cukes);
 }
Ejemplo n.º 5
0
 @Then("^my belly should growl as (.*)$")
 public void my_belly_should_growl(String arg) throws Throwable {
   Belly belly = new Belly();
   belly.growl(arg);
 }
Ejemplo n.º 6
0
 @When("^I wait (\\d+) hour$")
 public void i_wait_hour(int arg1) throws Throwable {
   Belly belly = new Belly();
   belly.wait(arg1);
 }