Shoudly — an awesome little .NET assertions library

If you’ve developed with .NET before, you are probably used to seeing assertions like this:

Assert.AreEqual(expectedObject,actualObject)

You also probably mix up the order of actualObject and expectedObject, and even then, the assertion messages suck.
Enter Shouldly. It uses a much simpler syntax

expectedObject.ShouldBe(actualObject)

It also gives you much better assertion error messages, such as “contestant.Points should be 1337 but was 0”.

I highly recommend it!

Leave a Reply

Your email address will not be published.