I am writing cucumber tests that specify certain numbers should be in certain places of the data as strings. So I am trying to run this:
myFeature.feature
...
Then this segment should equal 01
mySteps.java
@Then("^Then this segment should equal 01$")
public void myThenStep() {
// Do stuff
}
But what cucumber is telling me to use is this:
@Then("^Then this segment should equal (\\d+)$")
public void myThenStep(int arg1) {
// Do stuff
}
I am not trying to include arguments, I am trying to assert that the string I got equals 01. How do I do this? It seems really simple, but I can't find a way to escape that number. Thanks!