Hello Jonas,
I downloaded the 1.3 release and started to work with immeditatly.
I was planning on using the StepTransformation to transform a Table into a list of my enitites. But I'm not sure on how to write that. I cannot see any examples of that.
This is what I have so far:
.feature
Given the following events
| StartTime | EndTime | Title | Speaker |
| 2010-01-01 16:00 | 2010-01-01 20:00 | SpecFlow - an introduction | Marcus Hammarberg |
| 2010-02-01 17:00 | 2010-02-01 20:00 | What is BDD? | Dan Narth |
| 2010-03-01 18:00 | 2010-03-01 20:00 | NHibernate - what is it good for? | Iyende Raheen |
| 1994-01-01 14:00 | 1994-01-01 15:00 | The Internet - it could take off... | Bill Gatees |
The transformation (and very plain entity):
[StepTransformation("events")]
public IEnumerable<Event> EventListConverter(Table table)
{
return new List<Event>
{
new Event(),
new Event(),
new Event()
};
}
public class Event
{
}
and the Given-step:
[Given(@"the following events")]
public void GivenTheFollowingEvents(IEnumerable<Event> events)
{
ScenarioContext.Current.Pending();
}
This gives me the error:
-> binding error: Error calling binding method 'ListEventsSteps.GivenTheFollowingEvents(IEnumerable`1)': Object of type 'TechTalk.SpecFlow.Table' cannot be converted to type 'System.Collections.Generic.IEnumerable`1[Avega.Elevator.Specs.Transformations.Event]'.
What am I doing wrong?
/Marcus