My favorites | Sign in
Project Logo
          
New issue | Search
for
| Advanced search | Search tips
Issue 38: Add support for arrays/list in plain text scenarios
2 people starred this issue and may be notified of changes. Back to list
Status:  Working
Owner:  lazy...@gmail.com
Type-Enhancement


Sign in to add a comment
 
Reported by lazy...@gmail.com, Aug 20, 2009
It would be nice if we could do something like this:
[ActionStep("Given the list of fruits $fruitList owned by $ownerList")]
  public void Given2(IList<string> fruitList, IList<string> ownerList)

or 

Given("the list of (?<fruitList>magicRegex) owned by
(?<ownerList>magicRegex)")]
public void Given2(IList<string> fruitList, IList<string> ownerList)

Comment 1 by frederic.monjo, Aug 21, 2009
An idea to solve the problem: if the RegEx returns a multi-line string and the expected 
parameter type is an IList<string>, the split the string into a multiple entries in the 
list. If the parameter type is simple string, then provide the multi-line string as is.
Comment 2 by lazy...@gmail.com, Aug 25, 2009
Theres now support for arrays, ie
Given("the list of (?<fruitList>magicRegex) owned by
(?<ownerList>magicRegex)")]
public void Given2(string[] fruitList, string[] ownerList)

Status: Working
Sign in to add a comment

Hosted by Google Code