In many of our development projects, if not all, we are confronted with situations when we need to test our classes before the final deployment of a project. I’m not talking about Unit Testing here, though I highly recommend the excellent session on that topic from XDC 2018.
For example, it would not be desirable to send hundreds of emails to all the entries in a database simply to test one of the workflow steps or to verify that emails are being delivered as expected. It would be a lot simpler, and less disruptive to those using your app, to test using a few email addresses that are under your control.
So let’s establish a mechanism that allows us tell our apps when to run in a “simulated” mode vs. a “real” mode for all or some of the components that we need to test along the development cycle.