At first glance unit testing workflow activities with dependency injection seems like a no-brainer. For example consider the following activity using constructor-based dependency injection. public class SendEmail : CodeActivity { private readonly IEmailClient emailClient; public SendEmail() : this(new EmailClient()) {} … Continued
Unit Testing
Unit Testing Workflow 4 Activities : The TestContext Tracking Participant
I’m a big believer in using TestContext in MSTest or Console.WriteLine, Debug.WriteLine etc in your favourite Unit Testing framework to give context to passed or failed tests. Especially if you do CI and have only the test results to look … Continued
Unit Testing Workflow 4 Activities : Basics
Unit testing workflows became a lot easier in WF4. The basic approach is the same as for normal code classes except for a few differences which we will cover in the posts in this series. Lets start off with a … Continued
Unit Testing Visual Studio DSL Tools
I’ve been meaning to post this entry for a while now so while I wait for a 2010 beta install to complete…. For a long time I thought it wasn’t possible to unit test DSL Tools projects easily. Due to … Continued
MS-Test DeploymentItem Attribute……..Aaaaaaaagh!
We have a policy of using MS-Test, although that is overdue for a serious review. So it turns out you can use the deployment item attribute…. [TestMethod] [DeploymentItem("UnitTest.MyProject.TestData.xml")] public void GetAllStatuses() {…} ….As long as you don’t provide a constant… … Continued
Visual Studio Unit Test and the evil vsmdi
During a recent project we found a recurring problem where the test view of the unit (& integration) test projects would not load and we could not run tests. This was typically seen by the Test View load progress bar … Continued