Friday October 9th

Thursday October 8th

2 Kicks

Migrating from NUnit to xUnit

If you are currently using NUnit to write your unit tests, then it is not at all difficult to migrate to using xUnit. The philosophical difference between the two is simply this: with xUnit you need to think of your tests as objects, rather than of methods. Here is a visual representation of equivalent test setups between NUnit and xUnit...


I originally started with xUnit myself, but decided that with the better support that nunit has there was no point. xUnit sort of feels like a "me too" project. To me it feels like they changed keywords and concepts just for the sake of changing them. The words test and fact are not interchangeable, yet they're used to represent the same concept in both frameworks.

The fact that NUnit is still the predominant unit testing framework for .NET is a true testament to just how well it was designed. It's small and simple, yet very powerful.

That being said I have been really enjoying some of xUnit's newer features, such as the data driven Theories (which will probably be the subject of my next blog post). :)

Commenting on Stories is limited for now and will open up to those recommended by the community. Learn how
Loading DotNetKicks...
brought to you by the Kicks Network