title: Stub vs Mock when unit testing
body: <p>I have lately become very interested in testing and Im now trying to learn to do unit testing in the best way possible. I use NUnit together with Rhino Mocks. I have also been reading a lot over here at Stackoverflow but havent been able to find a clear answer to my question.</p>
  
  <p>What I wonder is if I have a method like the below, should I mock the OfficeClass dependency and also test GetAllOffices or only use a stub for the dependency and verify that the method GetAllOffices has been called and that I indeed get the offices back that I expected from my  setup for the stub?</p>
  
  <pre><code>public Offices GetAllOffices() 
  {
      try
      {
          var offices = officeClass.GetAllOffices();
          return offices;
      }
  }
  </code></pre>
  
  <p>Will it make any difference if the OfficeClass is just another POCO or if it is let say a web service in sence of mocking vs stubbing?</p>
  
  <p>Long question short: When to Mock and when to Stub in unit testing?</p>