Discova
Back to cards
Programming1 min readWikipedia, updated 28 November 2026

XUnit.net

Software testing framework for .NET software framework

xUnit.net is a free and open-source unit testing tool for the .NET Framework, written by the original author of NUnit. The software can also be used with .NET Core and Mono.

It is licensed under Apache License 2.0, and the source code is available on GitHub. xUnit.net works with Xamarin, ReSharper, CodeRush, and TestDriven.NET. It is authored by James Newkirk and Brad Wilson.

Example

Example of an xUnit.net test fixture:

After you compile the test, run it in your console:

Adapted from the Wikipedia article, CC BY-SA 4.0. Continue on Wikipedia

Go deeper

Ideas this article links to.