Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 1st, 2012  |  syntax: None  |  size: 0.48 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. Cannot prime method call in Rhino Mocks
  2. var getAllResponse = new GetAllResponse();
  3. // Prime the GetAll method
  4. var mockILineOfBusinessService = MockRepository.GenerateMock<ILineOfBusinessService>();
  5. mockILineOfBusinessService.Expect(i => i.GetAll(new GetAllRequest())).Return(getAllResponse);
  6.        
  7. public static string GetTeamForFocusArea(this ILineOfBusinessService lineOfBusinessService)
  8. {
  9.     ...
  10.     GetAllResponse response = lineOfBusinessService.GetAll(new GetAllRequest());
  11.     ...
  12. }