Created
April 27, 2012 14:52
-
-
Save danilo-barboza/2509895 to your computer and use it in GitHub Desktop.
Alias stepdef
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Given("^I have (\\d+) cukes in my belly$") | |
@Alias(values = { "^someone have (\\d+) cukes in my belly$", "^my belly contains (\\d+) cukes$" }) | |
public void I_have_cukes_in_my_belly(int n) { | |
} | |
// OR | |
@Given(values = { "^I have (\\d+) cukes in my belly$", "^someone have (\\d+) cukes in my belly$" }) | |
public void I_have_cukes_in_my_belly(int n) { | |
} | |
// It's possible to do that, but this ignored param is weird | |
@Given("^(I|someone) have (\\d+) cukes in my belly$") | |
public void I_have_cukes_in_my_belly(String ignored, int n) { // ignored is needed because of Arity mismatch | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment