I am faking an
IDbConnection and I want to fake the call to
Dapperextension) but I get a
NullReferenceException when doing so.
HereÂ´s my code:
IDbConnection myConnection = A.Fake<IDbConnection>(); A.CallTo(() => myConnection.QueryOne<MyDto>(A<string>.Ignored, <IDbConnection>.Ignored, A<IDbTransaction>.Ignored)) .Returns(new MyDto());
Isn't it possible to mock a generic method call in
FakeItEasy or why am I getting the exception?
Thanks in advance...