Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • I dont have the luxury of using C#5.0 features. Still I understand that it is possible to do the same with more code. This leads to another question. If i mock QueryManager using Rhinomocks then What should i do for returning Task type ? How would my mocked method will look like ? Commented Mar 5, 2013 at 16:14
  • You have to tell RhinoMocks what to return for example var theTask = CreateTask(); MockRepository.GenerateMock<IQueryManager>().Stub(qm=>StartQueryTask()).Return(theTask); Commented Mar 5, 2013 at 16:24
  • I've added some detail for non-C#5 Commented Mar 5, 2013 at 16:29