【发布时间】:2016-02-26 22:49:38
【问题描述】:
在绑定 specflow 测试时,通过 specflow 可以很容易地传递字符串、int、json 文件,但是在干燥的良好实践中,您可以在 specflow 步骤中传递泛型类型吗?
例如
Scenario
When I call the URL with the RequestObject and Type <url> <request> <type>
The response shall equal <response>
|url|request|type |
|xyn|abc |customObjectc#object |
[When(@"When I call the URL with the RequestObject and Type (.*)(.*)(.*)")]
public void WhenIBlablablabla<T>(string url, string request){}
<T> 是传入的类型,还是类似的东西?我想在dry的良好实践中尽可能概括我的specflow。
【问题讨论】:
标签: c# asp.net-web-api cucumber specflow