3

I try to set up a mock using

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

This leads to a NotSupportedException being raised in the function toCall.

How should I mock Async in Foq?

Is it supported?

Remko
  • 754
  • 3
  • 15

1 Answers1

2

Short answer: yes Foq supports returning an async block.

Issue is under discussion here: https://foq.codeplex.com/workitem/list/basic

Looks like the exception was raised as the arguments to DoIt were partially applied.

Phillip Trelford
  • 6,513
  • 25
  • 40