You can do this assuming you are providing the Func
to the code under test. You just make a Fake
out of it like you would any other type.
It will look something like this.
public class Foo {
public bool Bar(Func<bool> fn) {
return fn();
}
}
[Test]
public void Should_call_fn() {
var fn = A.Fake<Func<bool>>();
(new Foo()).Bar(fn);
A.CallTo(() => fn.Invoke()).MustHaveHappened();
}