I have an interface
public interface IDataProvider
{
T GetDataDocument(Guid document) where T:class, new()
}
I\'d like to mock
For the particular test you are going to use this mock for, you probably know what T will be, right?
simply just setup the mock for that:
myMock.Setup(m => m.GetDataDocument()>(It.IsAny()))
.Returns(() => new MyDataClass());
It's not really recommended to reuse the mocks anyway, so go ahead and setup mocks for the actual test at hand.