Appendix 1: Commonly Used Libraries with Unit Tests
We have used two major libraries for unit testing across the book:
- xUnit
- NSubstitute
Your team may be using these libraries already. Or you may have done a bit of experimentation with unit testing, and you want to expand your horizon into more libraries. While these libraries are popular, other libraries can replace them or work side by side with them. This appendix will skim through the following libraries:
- MSTest
- NUnit
- Moq
- Fluent Assertions
- AutoFixture
All these libraries use the MIT license, the most permissive license and you can install any of them via NuGet.
By the end of this appendix, you will be familiar with the libraries that form the ecosystem of unit testing in .NET.
Technical ...
Get Pragmatic Test-Driven Development in C# and .NET now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.