This project is read-only.


Make loose mocks throw for F# type return values with no setup


From Vasily Kirichenko:

It's very confusing and just not natural that #foq can return nulls as values of #fsharp types. ==> Tests do not reflect reality.

I think #foq should always throw some descriptive exception if a method/prop which returns a f# type hasn't been explicitly setup

From Phil Trelford:

Foq could try and discover if the return value is an F# value type (without AllowNullLiteralAttribute set) & always throw?

From Vasily Kirichenko:

Yes, I think it should always throw for f# types as return values.
Closed Jan 26, 2014 at 7:34 PM by ptrelford