There's more...

The purpose of this recipe is to highlight how easy it is to replace a portion of your code in a few steps without affecting the rest of your application. Although we replaced a concrete implementation with another concrete implementation, this might not be a common scenario. That said, the ability to replace a concrete implementation with a mock or a stub, without altering the integrity of your code, is of high value when you are trying to unit test your application, as we will see in Unit testing your plugin business logic later in this chapter.

The replacement doesn't necessarily have to be limited to the data access layers connecting to Dynamics 365; we can also implement substitutions in the plugin input entry level (as demonstrated in this chapter in Unit testing your plugin with an in-memory context), at the tracing layer (as demonstrated in the next recipe Logging error from your customization), or even the business logic itself.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.147.54.6