In this section, you will see how to start writing tests for your Nancy application. Throughout the book, I will write tests before implementation, following the red, green, refactor cycle of TDD. Consequently, you will see how to test many aspects of Nancy applications. This section just gets you started to using Nancy's testing features.
Before writing your first Nancy test, you'll need a unit testing framework and a test runner. I will be using
xUnit.net (http://xunit.codeplex.com/), but you can use whichever .NET testing framework that suits you.
The following steps will help you write tests for your Nancy application: