3

我尝试使用

Mock<Interface>.With(fun y -> <@ y.DoIt (any()) --> async {()} @>)

这导致NotSupportedException在函数中被提升toCall

我应该如何在 Foq 中模拟异步?

是否支持?

4

1 回答 1

2

简短的回答:是的,Foq 支持返回异步块。

问题正在这里讨论:https ://foq.codeplex.com/workitem/list/basic

看起来异常是由于 DoIt 的参数被部分应用而引发的。

于 2013-10-11T19:08:02.767 回答