Unit testing custom Microsoft Dynamics CRM code – Part 4 (using a wrapper class)

In parts two and three of this series, I gave an introduction to unit testing Dynamics CRM C# interfaces code with mock objects using Visual Studio 2012 and Moq, and I showed code samples for a couple of different scenarios. In this post I will show how to work with CRM metadata (optionset values, statuscode values, etc. »

Unit testing custom Microsoft Dynamics CRM code – Part 3 (intermediate interface example)

In my last post I gave an introduction to unit testing Dynamics CRM C# interfaces code with mock objects using Visual Studio 2012 and Moq. The sample code in that post was extremely simple, so I wanted to follow up with a more complex example that shows how to test multiple calls to the CRM web service instead of just a single one. »

Unit testing custom Microsoft Dynamics CRM code – Part 2 (simple interface example)

In my last post I explained why you should unit test your Dynamics CRM-facing code using frameworks to handle both testing automation and mock objects. In this post, I’m going to provide an overview of how to get started. As I mentioned last time, we’ll be using the unit testing tools included in Visual Studio 2012 for the unit testing automation and Moq for the object mocking. »

Unit testing custom Microsoft Dynamics CRM code – Part 1 (series introduction)

When writing custom code that interacts with Microsoft Dynamics CRM, it is important to: Unit test your code Use an automated unit testing framework to automate your unit tests Write unit tests that do not depend on external resources such as a Microsoft Dynamics CRM application server or SQL Server Over the course of my next several posts, I’ll be showing you some best practices for unit testing Dynamics CRM-facing code using Visual Studio unit testing tools and the Moq object mocking library. »

Extracting data with regular expressions in Microsoft Dynamics CRM 2011 processes

In last week’s blog post, I showed how to use regular expressions in Microsoft Dynamics CRM 2011 processes for data validation. Today I’ll show you how you can use a similar approach to parse text and extract matching strings using regular expressions in a Dynamics CRM 2011 process. If you’re unfamiliar with regular expressions, I recommend you take a look at my earlier post for an idea of how they work. »