Chunting Wu
Nov 2, 2021

--

Of course you can replace DI with other techniques like mocking. However, in my opinion, mocking will introduce much more implement efforts on writing the integration tests. By using DI, we will have an independent module/object/interface for the integration. But there is no silver bullet for a well-structured tests, you can use any method you preferred,

--

--

Chunting Wu
Chunting Wu

Written by Chunting Wu

Architect at SHOPLINE. Experienced in system design, backend development, and data engineering.

No responses yet