title: What is the mocking do?
body: <p>I read many post on SOF, and Google results.</p>
  
  <p>Still not figure out the value of mocking.</p>
  
  <p>From one of SOF' post :
  <a href="https://stackoverflow.com/questions/4314/what-is-object-mocking-and-when-do-i-need-it">What is Object Mocking and when do I need it?</a></p>
  
  <p>Object Mocking is used to keep dependencies out of your unit test. Sometimes you'll have a test like "SelectPerson" which will select a person from the database and return a Person object.</p>
  
  <blockquote>
    <p>To do this, you would normally need a dependency on the database,
    however with object mocking you can simulate the interaction with the
    database with a mock framework, so it might return a dataset which
    looks like one returned from the database and you can then test your
    code to ensure that it handles translating a dataset to a person
    object, rather than using it to test that a connection to the database
    exists.</p>
  </blockquote>
  
  <p>Example on above is also exist on many Google result , like this one (Code Walkthrough section)
  <a href="http://quickduck.com/blog/2008/02/18/unit-testing-mocking-and-dependency-injection/" rel="nofollow noreferrer">http://quickduck.com/blog/2008/02/18/unit-testing-mocking-and-dependency-injection/</a></p>
  
  <p>But it just resulting a 100% success method for unit test assertion,because we design the mocking method &amp; interface have to satisfy to TestCase. 
  It can't be fail in test, it different from real world database.</p>