Mock Dependencies: Instance and Configuration Injection With Swift

Nowadays, unit testing is an important topic. There is no doubt that we should test our code as much as possible to avoid bugs. Unfortunately, unit testing is not always easy since we may have very complex objects with a lot of dependencies. In this article, I want to show you a couple of approaches which I use to mock the dependencies of my objects to keep the tests as plain as possible.


Want to receive more content like this in your inbox?