Are your unit tests still hard to read ? – Should Assertion Library
I created the Should library to fill a gap in the testing ecosystem in the .Net space. Simply put, I took what I liked about using extension methods to make a more readable set of assertions, but made the library independent of any specific unit test framework. The last point is important, because this library can be used with all unit test frameworks. There were similar tools to this previously, but they all were tied to specific libraries so I could not have a consistent language when I move between test frameworks.
First, consider the syntax and the readability of the assertions of a unit test. This is what a null check looks like using should.
versus the equivalent syntax using MSTest.
Install it now
Should is available on nuget.
Learn more about it
Start by watching this short video
There are a number of place to learn more about Should.
- Great 8 minute video on Channel 9 on using Should with ASP.Net MVC : http://channel9.msdn.com/posts/ASPNET-MVC-With-Community-Tools-Part-12-Should-Assertion-Library
- Project Site on Github: https://github.com/erichexter/Should
There is a second dialect of Should called Should.Fluent. Learn about it here: