私は以下を試しました:
var getAllResponse = new GetAllResponse();
// Prime the GetAll method
var mockILineOfBusinessService = MockRepository.GenerateMock();
mockILineOfBusinessService.Expect(i => i.GetAll(new GetAllRequest())).Return(getAllResponse);
これは私がテストしているクラスのものです:
public static string GetTeamForFocusArea(this ILineOfBusinessService lineOfBusinessService)
{
...
GetAllResponse response = lineOfBusinessService.GetAll(new GetAllRequest());
...
}
In the above example the response type is always equal to null after the call to GetAll()
誰かが正しい方向に私を指すことができますpls?