 
  Data Structure Data Structure
 Networking Networking
 RDBMS RDBMS
 Operating System Operating System
 Java Java
 MS Excel MS Excel
 iOS iOS
 HTML HTML
 CSS CSS
 Android Android
 Python Python
 C Programming C Programming
 C++ C++
 C# C#
 MongoDB MongoDB
 MySQL MySQL
 Javascript Javascript
 PHP PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Unit Testing for C# Code
Unit testing is a key for C# code since it can help in maintaining code in the development process. It lets you know about the problems in the development cycle.
With Unit Testing, you can make the code reliable and reusable.
One of the fundamental principles of adopting unit testing is to follow a TDD (Test Driven Development) approach where we have to write tests case first, and then write the simple code that will make the test pass
For Unit testing, you need to work with Microsoft Testing tools, which is what we call MS Unit Test.
To create a Unit Test, go to Solution Explorer, right-click, go to New and click "New Project".
Now select "Unit Test Project" −
 
 Set a name for the Test and click Ok.
New Unit Test project is created.
Now right click on the new unit test and add the following reference −
Microsoft.VisualStudio.QualityTools.UnitTestFramework
