public void UsingdoOnMethodWithGenericReturnValue() { IGenericType <object> mock = MockRepository.Mock <IGenericType <object> >(); mock.Expect(x => x.MyMethod()) .DoInstead((MyDelegate) delegate { return(new object()); }); }
public void UsingdoOnMethodWithGenericReturnValue() { IGenericType <object> mock = MockRepository.Mock <IGenericType <object> >(); mock.SetUnexpectedBehavior(UnexpectedCallBehaviors.BaseOrDefault); mock.Expect(x => x.MyMethod()) .DoInstead((MyDelegate) delegate { return(new object()); }); }