Implementing C# 9 Unit Testing Using Visual Studio 2019 and .NET 5
Learn how to start unit testing to improve the quality of your applications.
What you'll learn
Every developer knows they should be creating unit tests to improve the quality of their applications. In this course, Basics of Unit Testing for C# Developers, you'll learn how to create unit tests by using Visual Studio.
First, you'll see how easy it is to get started with creating unit tests.
Next, you'll explore how to simplify the unit test process by creating data-driven tests.
Finally, you'll cover how to automate your unit tests by scheduling them to run via the command line utility VSTest.Console.
By the end of this course, you'll have the required skills needed to go on and learn more advanced topics in unit testing.
Table of contents
- Goals of This Module 1m
- Learning the Initialization and Cleanup Attributes 2m
- The Execution Order of Initialize and Cleanup Methods 1m
- Create the Assembly Initialize and Cleanup Methods 3m
- Build the Class Initialize and Cleanup Methods 3m
- Work With the Test Initialize and Cleanup Methods 5m
- Module Summary 1m
Unit testing is the process of testing individual units, or components, of source code to ensure that they are working properly. C# unit testing simply means to write unit tests in the C# language, presumably to most fully align with their application code itself.
A unit is essentially the smallest testable part of a software, typically composed of at least one input (sometimes more) and a single output.
Three of the top frameworks for unit testing in C# are:
- MSTest/Visual Studio
These are not the only unit testing framework options for C#, but they are widely considered some of the most preferable.
This C# unit testing course will teach you how to begin unit testing to improve the quality of your applications. Some of the topics covered include:
- Why you need unit testing
- Unit testing tools
- Exception handling in unit tests
- Initialization and cleanup
- Unit testing attributes
- Data-driven testing
- Automating unit tests
- Much more
This unit testing in C# tutorial is for anyone and everyone who wants to learn how to effectively conduct unit testing in C# to improve the quality of your applications. If you are developing applications in C# then this course is for you!
As far as unit testing goes, this course is for beginners who are just now learning about the topic. However, you will want to already have a working knowledge of C# programming before taking this course.