it:ad:fluentassertions:home

IT:AD:FluentAssertions

Summary

IT:AD:NUnit had fluent assertions out of the box. IT:AD:XUnit doesn't.

A third party library adds it in an elegant, portable manner.

The library works equally well with IT:AD:NUnit as IT:AD:XUnit as well other frameworks – so it makes your tests portable (bar the Test/Fact attributes which have to be updated).

The library uses a Should() method followed by one of a set of Be...() methods, which makes your tests very readable:

var foo = false;
foo.Should().BeTrue();

var bar = 3;
foo.Should().Be(3);
foo.Should().BeGreaterThan(2);
foo.Should().BeLessThan(4);
foo.Should().NotBe(5);

  • /home/skysigal/public_html/data/pages/it/ad/fluentassertions/home.txt
  • Last modified: 2023/11/04 03:24
  • by 127.0.0.1