– Photo by Hello I’m Nik 🇬🇧 on Unsplash
Maybe you have heard about the mocking technique a lot, but never understood very well how it works or doubted if it is really worthwhile. This article is aimed at those who do not know what the tests with mocks are and what they are for. I’ll focus on telling you about the pillars of such technique, why it is good for unit testing and how apply it in your application without the need of a framework.
Then, in a future post, I’ll show you the steps to progressively transition from integration tests to real unit tests and how to adopt the popular ApexMocks framework. That will really make the difference to your daily work. However, you’ll get better results if you first let the mocking principles to mature in your mind. Really exciting, isn’t it?
Continue reading “Mocking fundamentals – simple mocks without frameworks”