Archive for the ‘mocking’ Category
Mocking intricate dependencies
Posted April 17, 2012
on:- In: GIDS | mocking | unit testing
- Leave a Comment
How to use mock to simplify unit testing?
Not easy to test code dependent on other pieces like database.
Unit test only the smallest piece of code that does something useful should be unit tested.
Types of unit tests
1. Positive test
2. Negative test
3. Exception test
4. Performance test
Create multiple mocks instead of complex mock objects for different test cases.
Advertisements