C# Unit Test

Unit test is an automated test that verifies if a single unit of a program works as expected. A single unit is the smallest piece of code that can be logically isolated in a program. Usually. it is a single method in a class.

Usually for each project with production code, we create a seperate project with unit tests. We’ll create a new project of class library type. The typical naming convention is that the testing project should be named the same as the project it tests, but it should have the Tests postfix.