In this post we will learn how to write Unit Test Cases for a MVC project.
One strong reason behind choosing MVC approach is TDD (Test Driven Development).
If we say my Data layer / Business Layer is 100% tested,it should pass all the positive scenarios and fail in all negative scenarios.
In order to do that, we need to write test cases for all the public methods present in different layers of our application and test them thoroughly.
I have created a very simple POC for demonstrating on how to write test cases.
One strong reason behind choosing MVC approach is TDD (Test Driven Development).
If we say my Data layer / Business Layer is 100% tested,it should pass all the positive scenarios and fail in all negative scenarios.
In order to do that, we need to write test cases for all the public methods present in different layers of our application and test them thoroughly.
I have created a very simple POC for demonstrating on how to write test cases.