February 2012
1 post
When to use unit testing mock objects ?
Usually when to write unit test, you are trying to test if a small piece of code is working as intended. But there are some times when part of that small code depends upon third party web service or database connection that are simply out of your control.Thats when you use mock objects which would behave exactly as you tell them.
Following is simple code example that would explain itĀ further:
...