Test the most smallest unit (method)

Test Double

  • Replace a real implementation
  • Break dependency via Dependency Injection

Test Double Types

  • Dummy (empty fake object)
  • Fake (simplified but anyway working fake object)
  • Stub (fake object w/ no logic, pre-programmed return values)
  • Spy (log the actual object)
  • Mock (fake object w/ no logic, check the internal behavior of the object)

Test Double Spectrum

Test Double Spectrum


Back

Categories: ,

Updated: