»
Jul 22nd, 2009,
category:
Testing
,
Perm Link...
What is mock
Mock object, in software development is an object that is created when developer does unit testing. The mock object will need to act like the real object in order to correct the situation. The mock object, some time is the real object or real code with some modification, interception or replacing an object attribute and method.
Why mock
Imagine when you work with something that;
- Doesn't exist but you need to use it and yes you want to get very quickly
- Hard to setup, no body love test if it hard and pain than writing the code
- Take time. In real life, you will need to write code and test and (common, write test and than code, please :p)... If your test environment take longer time, you will need to multiply it by the number of making a test. Sound sad...
So, let mock help your life easier.