Integration of FsCheck and NUnit

I want to integrate FsCheck tests using NUnit tests. In particular, when I declare several FsCheck properties, I want them to be visible and executable from VS. I found the following xUnit description along with FsCheck (under "Implementing IRunner to Integrate FsCheck with mb | x | N | cs | Unit"), but that’s not what I want. Is there any way to do this?

+5
source share
2 answers

Can you explain why using this is not what you want? This is a way to return the FsCheck test result back to NUnit. You should write FsCheck tests in the same way as regular NUnit tests and assign them to the Test attribute (or whatever the name in NUnit).

NUnit, NUnit. NUnit . , XUnit.NET, FsCheck.Xunit . FsCheck , NUnit XUnit.

+3

FsCheck.Nunit nuget F # 3.1 ( )

:

nuget ( )

[<Property>]
let maxLe (x:float) y = 
    (x <= y) ==> (lazy (max  x y = y))

, Verbose = true Property

+6

All Articles