SoC and the Apex Common Library Tutorial Series Part 17: Implementing Unit Tests with the Apex Mocks Library
| |

SoC and the Apex Common Library Tutorial Series Part 17: Implementing Unit Tests with the Apex Mocks Library

What is Apex Mocks? Apex Mocks is unit test mocking framework for Apex that was inspired by the very popular Java Mockito framework. The Apex Mocks framework is also built using Salesforce’s Stub API which is a good thing, there are mocking frameworks in existence that do not leverage the Stub API… you shouldn’t use…

SoC and the Apex Common Library Tutorial Series Part 16: Unit Test Mocks with Separation of Concerns
| |

SoC and the Apex Common Library Tutorial Series Part 16: Unit Test Mocks with Separation of Concerns

How does Unit Testing fit into Separation of Concerns? The answer to this is simple, without Separation of Concerns, there is no unit testing, it just simply isn’t possible. To unit test you need to be able to create stub (mock) classes to send into your class you are testing via dependency injection (or through…