xUnit.NET

Friday, October 11, 2013

Unit Testing Tool for .NET Framework

Created by NUnit inventor

Open Source

Features:

  1. Runs inside Visual Studio
  2. Aligned with .NET platform
  3. For every test executed a new test instance is created
  4. No setup/teardown attributes
  5. No expected exception attribute
  6. Uses language features to seamlessly integrate with .NET platform
  7. Designed for TDD/Unit Testing
  8. Extensible for advanced scenarios

Install xunit.net Nuget package


1 solution, 2 library projects, xunit reference


A first, simple test


Install xunit runner from extension manager


Execute test in test explorer


Unit Test reference types


Unit Test reference types with overriden equals


Unit Test IEqualityComparer


Unit Test Collection value types equal


Unit Test Collection value types not equal


Unit Test Reference types list not equal


Unit Test Reference types list equal with overriden equals


Unit Test Equality Decimals

Default Success Warning Important Info Inverse
B S W I ? O