Simple play icon Course
Skills Expanded

Testing .NET Code with xUnit.net 2

by Jason Roberts

Learn how to get started writing .NET tests using the open source xUnit.net 2 testing framework.

What you'll learn

xUnit.net 2 is a modern, extensible, multi-platform testing framework for .NET. Currently being used by the Microsoft ASP.Net 5 development team, xUnit.net allows the creation, execution, and customization of automated tests such as unit, integration, and, when combined with other libraries, even automated UI tests. In this course, you'll learn about the features of xUnit.net 2 and learn how to write and run tests in Visual Studio Test Explorer, ReSharper, and from the command line. You'll learn to write test asserts against different types of objects, including how to assert against floating point values, collections, and how to check that exceptions are thrown when expected. The course also covers how to customize the test execution life cycle and how data driven tests can reduce the amount of test code that needs to be written and help reduce test maintenance costs.

Table of contents

About the author

With over 15 years of experience in both frontend and backend software development, Jason Roberts is a freelance developer, trainer, and author. He holds a Bachelor of Science degree in computing, is the author of several books, and writes at his blog DontCodeTired.com. Jason is an open source contributor and in addition to enterprise software development, he has designed and developed Windows Store and Windows Phone apps.

Ready to upskill? Get started