Nancy.Testing - executable specifications through the full stack, in memory
February 7, 2013
When I showed the code from the last post to a colleague (Hugo Häggmark), he remarked: Nice - but that’s no unit test. And he’s absolutely right.
A unit test should test a unit. The tests in the last post, and the test that Nancy.Testing allows us to easily write, flexes the whole stack of our application. In memory (which is super cool) but the full stack. That’s no unit test.
This can still be VERY useful and in this post I’ll show you how to put one of my favorite tools, SpecFlow, in front of what we wrote in the last post, to get an executable specification. Not only that - I’ll do it in a manner that lets you swap it and hit the HTML page if you wanted to.
As the tradition calls - let’s look in wonder at...