cucumber/cucumber-jvm — Issue #113: Suggested stepdef template generated with incorrect parameters
Author: pettermahlen
Created: 2011-12-08 13:18:20+00:00
State: open

Given this in a .feature definition and no step definitions:

When the DI system receives a message saying "{ dataIngestion: { feeds: [ feed: { merchantId: 666, feedId: 1, feedFileLocation: feed.csv } ] }"

The runner proposes adding a step definition like so:

@When("^the DI system receives a message saying \"([^\"]*)\"$")
public void the_DI_system_receives_a_message_saying_(String arg1, int arg2, int arg3, int arg4, int arg5) {
// Express the Regexp above with the code you wish you had
}

I think the regex is correct, but the parameter list is not - it looks like it picked up the 2 numbers in the JSON message twice, somehow, leading to four integer parameters. What I expected was simply a single String parameter.