Understanding unit testing
Unit testing is a way to test the smallest isolated unit of an application. It is an important step in software development that helps isolate a problem early.
Unit testing has a direct impact on the quality of the software we build. It is always recommended to write a unit test as soon as you write any method. If we follow the methodology of Test-Driven Development (TDD), we write the test case first and then proceed to implement the functionality.
In the next section, we will learn about creating unit tests and running them from Visual Studio.
Unit testing in Visual Studio
We chose to use Visual Studio as it has powerful tooling to create and manage test cases.
With Visual Studio, we can create, debug, and run unit test cases. We can also check the code coverage of the tests that are executed. Additionally, it has a Live Unit test feature, which runs unit test cases while we modify the code and shows the results in real time.
We will...