Posts

  • Test Dependency Injection in iOS Unit Testing

    Software development compose of small components to a big one, like lego. So when a component needs another component another one is the dependent one. We call the component has a dependency.

  • Search Multiple Words in Terminal

    I write notes with nvALT and vim, I always do search with terminal, but I had suffered that it’s hard to search multiple words with AND condition in a file. It’s easy to search in IDE.

  • Test Double in Swift - Stub

    We replace a real object with a test-specific object that feeds the desired indirect inputs into the system under test.

  • Test Double in Swift - Mock and Spy

    Mock and Spy, use to test interactions between objects. We capture the indirect outputs or inputs of the SUT as they occur and compare.

  • Test Double in Swift - Fake

    A Fake Object offers limited functionality like the real object. But the implementation is lightweight. The fake object avoids the complications that make the real thing a difficult dependency.