Why Unit Test
Unit test give us:
- Confidence while writing code.
- Discover design flaws early in coding process.
- Discover run-time errors early.
- Discover logic error.
- Provide multiple entry points for debugging.
- Documentation of the code.
The best developers in the world regularly make mistakes and that's okay. Even the most experienced developers would never overlook testing though.
An ounce of prevention is worth a pound of cure.
It often shorten the overall time it takes to finish a product by building quality in early in the process.
Three main .NET Frameworks.
- MSTest (Visual Studio Unit Testing Framework)
- NUnit
- xUnit.net
All of this units based on popular unit testing frameworks for Java called jUnit.
xUnit.net is the most popular and the one that has many developers.
Click on Tools > Update and Extension > xUnit.net