【问题标题】:JBehave Tabular Parameter IssueJBehave 表格参数问题
【发布时间】:2013-11-05 19:50:54
【问题描述】:

我有一个带有表格参数“flightDate”的步骤。问题是当占位符出现在映射到“flight”的字符串中时,它不会被实际值替换,而“flight”恰好在 JSON 中。关于如何替换所有发生的 flightDate 的任何建议?

步骤:

@When("I book flight on <flightDate> where flight matches {$flight}")
public void bookTransaction(@Named("flightDate") Date flightDate, 
                            @Named("flight") Flight flight) {
}

故事:

Given ...
When I book flight on <flightDate> where flight matches {
    flightDate: <flightDate>,
    ...
}
Then ...

|flightDate|
|2013-07-26|

【问题讨论】:

    标签: bdd jbehave


    【解决方案1】:

    如果您在示例表中使用 ,它应该可以工作。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-17
      相关资源
      最近更新 更多