
Untitled
By: a guest on
May 1st, 2012 | syntax:
None | size: 0.48 KB | hits: 19 | expires: Never
Cannot prime method call in Rhino Mocks
var getAllResponse = new GetAllResponse();
// Prime the GetAll method
var mockILineOfBusinessService = MockRepository.GenerateMock<ILineOfBusinessService>();
mockILineOfBusinessService.Expect(i => i.GetAll(new GetAllRequest())).Return(getAllResponse);
public static string GetTeamForFocusArea(this ILineOfBusinessService lineOfBusinessService)
{
...
GetAllResponse response = lineOfBusinessService.GetAll(new GetAllRequest());
...
}