Test Driven Development, Mocking and Force DI — Andy in the Cloud


In this blog I want to highlight the use of Test.createStub with Force DI, to effectively inject mock implementations of dependent classes. We will go through a small example showing a top-level class with two dependencies. In order to test that class in isolation as part of a true unit test, we will mock its […]

via Test Driven Development, Mocking and Force DI — Andy in the Cloud