gpt4 book ai didi

regex - cucumber JVM : How do I use a double as an input value?

转载 作者:行者123 更新时间:2023-12-04 13:28:02 25 4
gpt4 key购买 nike

对于我要编写的行为测试,我需要输入为浮点数。如何设置小 cucumber 字符串以查找这些值?

最佳答案

简单的(.+)应该可以工作

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 {
...
}

关于regex - cucumber JVM : How do I use a double as an input value?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14902076/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com