Showing posts with label Unit Testing. Show all posts
Showing posts with label Unit Testing. Show all posts

Unit testing CRM 2011 plugins. Approaches - Part 2

As promised I will explain two more approaches today.

I’m going to test same plugin as I tested in previous post. Plugin creates a task to qualify lead in two weeks each time lead is created. I use MS Test as unit testing framework.

Structure of the solution is explained in previous post. It much easy to get the thing right if you take a look on part 1: "Unit testing CRM 2011 plugins. Approaches - Part 1".

Unit testing CRM 2011 plugins. Approaches - Part 1

Today I want to describe two possible ways to unit test plugins. I will explain advantages and disadvantages of approaches.

I’m going to unit test a plugin which creates a task to call a lead in two weeks after lead creation. MS Test will be used as unit testing framework.

First of all let me give you overview of the Visual Studio solution. It consists of three projects:


HowTo.Logic – Class library. Contains business logic.
HowTo.SimplePlugin – Class library. Contains plugins.
HowTo.Tests – Test Project.