Principles of mocking for tests

  • You should be careful with the amount of mocks you write, because the more you mock, the less confident you can be that software is going work. Remember, your test should resemble the way it is going to be used|.
  • You want to mock 3rd party APIs like payment services or email services, or anything that will cost you money when running tests.