FsUnit


Lightweight FsUnit with Paket

FsUnit supports lightweight usage scenario with Paket and NUnit.

In the case when you do not want to add dependency on FsUnit package to your project, you can add reference to FsUnit.fs file and NUnit package.

Example of paket.dependencies file:

1: 
2: 
3: 
4: 
5: 
6: 
7: 
8: 
9: 
source https://nuget.org/api/v2

nuget FSharp.Core
github fsprojects/FsUnit src/FsUnit.NUnit/FsUnit.fs

group Test
    source https://nuget.org/api/v2
    nuget NUnit.Console
    nuget NUnit

Notice that this scenario works only with NUnit. File src/FsUnit.NUnit/FsUnit.fs contains dependency-free subset of FsUnit operators. In order to write tests you need to add reference to NUnit package and reference to NUnit.Console to be able to run tests from build script.

Example of paket.reference file for test projects:

1: 
2: 
3: 
File:FsUnit.fs
group Test
    NUnit
Fork me on GitHub