You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But when I do, I get NullReferenceException because somehow ReturnsAsync is returning null. I also can't do .Verifiable().ReturnsAsync(...) because Verifiable is void. (Note I am using the Moq.Dapper library here, but this seems unrelated to me since the method causing my issue is from the core library)
You definitely shouldn't have to spread out a setup like that. But it's hard to tell what's going wrong here since SetupDapperAsync isn't part of Moq. Can you please provide example repro code that does not use any Moq extensions? (If you can only reproduce the problem using some 3rd-party extension library, you probably need to ask at their repository.)
Hey, I am having some difficulty with one of my mocks. I want to do this:
But when I do, I get NullReferenceException because somehow ReturnsAsync is returning null. I also can't do
.Verifiable().ReturnsAsync(...)
becauseVerifiable
isvoid
. (Note I am using the Moq.Dapper library here, but this seems unrelated to me since the method causing my issue is from the core library)I have been able to get it working like this:
But I'd rather not have to spread it out like that since usually the setup is chainable.
Any suggestions?
The text was updated successfully, but these errors were encountered: