Posts

Showing posts with the label Unit Test for Dynamics 365 CRM / CE PlugIns and Workflows.

Unit Test or Test Driven Development for Dynamics 365 CE/CRM PlugIns - Custom Workflows

Image
Life is easy with Test Driven Development even for Dynamics 365 PlugIns and Workflows. Any delta that be applied to the existent codes require test in order to see overall impact and ensure stability so each of the lines should be tested again,again,again with couple test cases. My main target is to perform testing without CRM record generation in Dynamics CRM organization so I develop mock classes in order to simulate Dynamics CRM Data access layer thus Post or Pre operations just reach to my mock classes and send back necessary responses without accessing SQL Server Database. I will explain all technical details below and share Project web page in github.com for sure. First of all, I used power of Visual Studio 2019 community edition by creating " Unit Test Project (.NET Framework) " and downloading  Microsoft.CrmSdk.CoreAssemblies Version 9.0.0.7 from NuGet  in the study. Let's start from introduction section as usual :) Introduction A plug-in is a custom