There are a few limitations when it comes to the History records created by default when Field Level History is enabled for an object, not the least of which is history records not being created in tests. This can make testing logic out that employs History records difficult to approach, especially from a Test Driven Development standpoint - but it doesn't need to be so hard. Join me as we walk through how to setup an easily reuseable implementation for mocking History records and retrieving ...| www.jamessimone.net
One of the best thing about using strongly typed query builders is the type-checking that you get -- for free -- while using them. Type-checking not only prevents you, as a developer, from making a mistake -- it also prevents admins from updating the API name for a field or from being able to delete it while it's referenced within your Apex code. Even if there were no other use for the `Schema.SObjectField` class, those two reasons alone would make it worth our while when deciding when to use...| www.jamessimone.net
Learn how to use Repositories to protect your SOQL usage and easily swap implementations in unit tests| www.jamessimone.net
Dependency injection is a crucial method for correctly initializing & testing objects, and the Factory pattern can help to standardize how your SFDC Apex objects are produced| www.jamessimone.net