DmlWork a.k.a. the UoW meets Triggers
Building a neat UoW wrapper for compounding service methods effectively and merging the Unit of Work approach with updating SObject instances in Triggers.
Building a neat UoW wrapper for compounding service methods effectively and merging the Unit of Work approach with updating SObject instances in Triggers.
Peeping into the Unit of Work to help with Batch job chaining and having to really think about who extends who when mocking and testing.
TL; DR; Standardising mocking throughout your code base in the simplest way possible without mixing test-only and production code. See on GitHub or below (in full) The Problem Mocking in (Apex) unit tests is very useful. There are, however, a few challenges to it. How exactly do you replace the… Read More »Class Factory
TL; DR; Apex utility wrapping DML operations and logging their results consistently. And a mock version of the same allowing to do “pretend” DML in Unit Tests. Full source on GitHub (link). The Problem Not really a problem to be honest. It started with a desire to reduce duplication in… Read More »DML (Mock) Service