Avoid having to await ReturnsAsync
kzu opened this issue · 4 comments
Currently this generates a warning from the compiler since you're not awaiting a Task-returning method
I'm not certain I understand this issue correctly, but if I do, devlooped/moq#1126 may be relevant here. That kind of compiler warning is one of the reasons why I added the ability to directly set up a task's .Result
to Moq 4.
Such a beautiful and simple solution! Thanks for bringing it up. Makes perfect sense. Now I want to remove all Async overloads in Moq 5, 😅.
Thanks a ton for keeping an eye on this repo and plz do monitor https://github.com/devlooped/avatar too 🙏
@kzu, glad you like it. 😃 And yes, I'll keep an eye on both Moq 5, and Avatar. Such impressive libraries!
Now I want to remove all Async overloads in Moq 5
@kzu, please ping me if you decide to do that. I've considered marking them as [Obsolete]
in Moq 4, but due to them likely being in widespread use, I've so far resisted. However, if Moq 5 won't have them anymore, I'd go ahead an deprecate them in 4, too.