Featured resource
Tech Upskilling Playbook 2025
Tech Upskilling Playbook

Build future-ready tech teams and hit key business milestones with seven proven plays from industry leaders.

Learn more
  • Path icon Learning Path
  • Libraries: This path is only available in the libraries listed. To access this path, purchase a license for the corresponding library.
  • Core Tech

C# Unit Testing with xUnit

7 Courses
13 Hours
Skill IQ

Unit testing has become standard practice for today's software developers and xUnit is one of the most popular unit testing frameworks available for .NET. The goal of this learning path is to help you understand how to write clean, testable code, all the way from writing your first test to mocking out dependencies to developing a pragmatic suite of unit tests for your application.

Content in this path

Beginner

The courses in this section will help you master the basics of writing unit tests. First, you will learn how to use xUnit, one of the most popular unit testing frameworks used in .NET. Then you will learn how to use Moq, a mocking framework which allows you to replace dependencies in your code when you write tests. Mastering these two frameworks will help you create unit tests for a wide-ranging set of scenarios you encounter when writing code.

Advanced

There are a number of open source libraries that can help you write more readable, maintainable unit tests, and the courses in this section are designed to introduce you to the most useful of these libraries. A short investment of time in watching these courses will save you lots of time later as you learn about the advanced capabilities these libraries add to your unit testing toolkit.

Try this learning path for free
Access this learning path and other top-rated tech content with a free trial.
Have questions? Get them answered now.
What You'll Learn
  • Creating unit tests using xUnit
  • Running unit tests from Visual Studio
  • Mocking dependencies using the Moq framework
  • Validating method calls using the Moq framework
  • Creating partial mock classes
  • Writing testable code
  • Build a unit testing suite for your application
  • How to use AutoFixture to create test data
Prerequisites
  • Familiarity with the C# programming language
Related topics
  • C#
  • ASP.NET
Not sure where to start?
With over 500 assessments to choose from, you can see where your skills stand and receive adaptive learning recommendations to fill knowledge gaps in as little as 10 minutes.
Learn more

Join our learners and upskill
in leading technologies