Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cucumber JVM: How do I use a double as an input value?

For a Behavior test that I'm trying to write, I require inputs that are floating point. How do I set up my gherkin string to look for these values?

like image 866
user321605 Avatar asked Feb 15 '13 19:02

user321605


1 Answers

Simple (.+) should work

Given I have a floating point 1.2345 number

@Given("^I have a floating point (.+) number$")
public void I_have_a_floating_point_number(double arg) throws Throwable { 
    ... 
}
like image 99
denis.solonenko Avatar answered Oct 04 '22 21:10

denis.solonenko