Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我尝试使用
Mock<Interface>.With(fun y -> <@ y.DoIt (any()) --> async {()} @>)
这导致NotSupportedException在函数中被提升toCall。
NotSupportedException
toCall
我应该如何在 Foq 中模拟异步?
是否支持?
简短的回答:是的,Foq 支持返回异步块。
问题正在这里讨论:https ://foq.codeplex.com/workitem/list/basic
看起来异常是由于 DoIt 的参数被部分应用而引发的。