O'Reilly logo

Instant Nancy Web Development by Christian Horsdal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Nancy testing – your first Nancy tests (Intermediate)

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.

Getting ready

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.

How to do it...

The following steps will help you write tests for your Nancy application:

  1. Open Visual Studio.
  2. Create a new empty C# ASP.NET ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required