How to use power of varargs while defining step definitions in cucumber java bindings. I have below step
Given I have following product: prod1, prod2, prod3Here product list can be variable.
My Step definition
@Given("^I have following product [(exhaustive list of products or pattern of the product names)]$")
public void stepDef(String...args)
{
//Process varargs array "args" in here
}I know workaround can be to except the complete string after colon and then in the code break the string using split(",") and dump it into array. But i just want to know if cucumber on its own supports varargs pattern.
TIA!!!
How to use power of varargs while defining step definitions in cucumber java bindings. I have below step
Given I have following product: prod1, prod2, prod3
Here product list can be variable.My Step definition
@Given("^I have following product [(exhaustive list of products or pattern of the product names)]$") public void stepDef(String...args) { //Process varargs array "args" in here }I know workaround can be to except the complete string after colon and then in the code break the string using split(",") and dump it into array. But i just want to know if cucumber on its own supports varargs pattern.
--TIA!!!
Posting rules: http://cukes.info/posting-rules.html
---
You received this message because you are subscribed to the Google Groups "Cukes" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cukes+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
ThanksMrunal