Skip to content

Working with NFluent

Cyrille DUPUYDAUBY edited this page Feb 1, 2019 · 5 revisions

Integration

Simply add the NFluent package to your test project(s). NFluent has no dependency (beside the Net framework). Note that it comes on top of your testing framework: NUnit, xUnit, MsTest...

Compatibility

Current NFluent versions (2.1+) are compatible with all Net versions: Framework (2.0, 3.0, 3.5, 4.0, 4.6), Standard (1.3+, 2.x). NFluent explicitly supports NUnit, xUnit and MsTest by raising the native exception for those framework; NFluent should be compatible by any testing framework using exceptions to raise test errors.

Caveat:

NFluent versions for Net Framework prior 4.0 (i.e 2.0, 3.0 and 3.5) define some delegates (standard in 4.0+); those types are declared in the NFluent namespace, but they may introduce naming ambiguities if you happen to use libraries that also define those types. You should be able to resolve ambiguity by prefixing the type with the proper namespace.

Other considerations

  • NFluent supports SourceLink, this allows you to debug through NFluent when you feel you need to.
  • NFluent assembly is signed so it can be referenced by signed assemblies