tag:blogger.com,1999:blog-3208248179046825763.post7336616732038832168..comments2023-11-03T08:08:16.593-05:00Comments on GrabBag<T>: Authoring stories with NBehave 0.3Jimmy Bogardhttp://www.blogger.com/profile/17386366910219679015noreply@blogger.comBlogger5125tag:blogger.com,1999:blog-3208248179046825763.post-71229543890485212702007-09-17T09:54:00.000-05:002007-09-17T09:54:00.000-05:00@anonymousHmmm...I might have to see some example ...@anonymous<BR/><BR/>Hmmm...I might have to see some example code to understand what you mean. As long as the actions match up to the context, event, and outcome of your scenario, you can't really go wrong.Jimmy Bogardhttps://www.blogger.com/profile/17386366910219679015noreply@blogger.comtag:blogger.com,1999:blog-3208248179046825763.post-57128313662314192442007-09-13T03:40:00.000-05:002007-09-13T03:40:00.000-05:00Thanks but what I have done is use the delegate to...Thanks but what I have done is use the delegate to build up an object I then past to then When. Is that how you see it working?Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-3208248179046825763.post-57812045795531452832007-09-12T09:04:00.000-05:002007-09-12T09:04:00.000-05:00@anonymousYou always need an action delegate to pa...@anonymous<BR/><BR/>You always need an action delegate to pass to the scenario fragments. Here's an snippet of your month example:<BR/><BR/>.And("the month is", "December", delegate(string month) { Assert.AreEqual(month, someObject.Month) });Jimmy Bogardhttps://www.blogger.com/profile/17386366910219679015noreply@blogger.comtag:blogger.com,1999:blog-3208248179046825763.post-18761970748967880202007-09-12T02:43:00.000-05:002007-09-12T02:43:00.000-05:00I have tried a similar example. So far so good. Ho...I have tried a similar example. So far so good. How do you handle<BR/>story .And("month is", "December") etcAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-3208248179046825763.post-89927076523331868812007-09-11T01:12:00.000-05:002007-09-11T01:12:00.000-05:00Very interesting post!I've tried this code also wi...Very interesting post!<BR/>I've tried this code also with MbUnit and it works fine just changing the Assert inside Then method as shown below:<BR/><BR/>.Then("the correct customer is found and returned",delegate { Assert.AreEqual(customer.Name, "Joe Schmoe"); });<BR/><BR/>Bye<BR/>makkaAnonymousnoreply@blogger.com