You are reading the third part of the main article: Testing Dynamics CRM . A plugin is custom code that runs within CRM’s process. However, when unit testing, we have to isolate the environment in which the plugin code runs. In addition, we need to provide the parameters required to successfully execute. The first order of business is to analyse the parameters provided to the plugin by its interface definition. CRM provides only one parameter, namely IServiceProvider . This service... Read the full text.