WorkFlow Unit Testing

2019-03-27 14:18发布

How to unit test the windows workflows?

3条回答
虎瘦雄心在
2楼-- · 2019-03-27 15:22

MS dropped the ball on making workflows easily mockable and testable. If you want to do thorough tests on your custom activities you'll need to purchase a mocking framework that can mock sealed types such as TypeMock. Otherwise, you'll have to write your code around the limitations of Workflow.

查看更多
Rolldiameter
3楼-- · 2019-03-27 15:23

Microsoft.Activities.UnitTesting.

A library of helper classes and activities designed to make unit testing of workflows easier.

Looks like there's a Channel 9 video for it on the downloads page, too.

查看更多
对你真心纯属浪费
4楼-- · 2019-03-27 15:25

K. Scott Allen has posted this, which provides an approach to unit testing custom activities (although he says that he is not satisfied). A similar approach is presented by Ron Jacobs here and here.

Another approach is presented by Maurice here and here (he uses TypeMock as Will already mentioned).

查看更多
登录 后发表回答