TDD Second Demo

Testing the database can slow you down tremendously and that's where mocking comes in. Mocking allows you to simulate the database. Mocking needs an external feature to test.

The goal by mocking the database is not to prove that the database work, but rather the logic that interact with database.

To learn more about testing, let's create another project called MvcUnitTesting. Don't forget to Add Unit Test.

Take a look at controller in test project. There are 3 test methods in Index, Contact and About.

Try to build and retest again. Take your time to change the value that being asserted.

results matching ""

    No results matching ""