我试图设置一个模拟
Mock<Interface>.With(fun y -> <@ y.DoIt (any()) --> async {()} @>)
这将导致在函数NotSupportedException中引发toCall。
NotSupportedException
toCall
我应该如何在Foq中模拟异步?
它支持吗?
发布于 2013-10-11 19:08:02
简短的回答:是的,Foq支持返回异步块。
问题正在讨论中:https://foq.codeplex.com/workitem/list/basic
看起来异常是在部分应用到DoIt的参数时引发的。
https://stackoverflow.com/questions/19288722
相似问题