开发者

Unit Testing a WF4 Workflowservice [closed]

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visi开发者_C百科t the help center. Closed 11 years ago.

I am playing around with WF4 beta 2 and want to unit test a workflowservice. Perhaps I am missing something, but this does not seem trivial.

As far as I can see, I might use WorkflowServiceHost. But I think this is a lot of overhead to create a host and then consume it in the test.

Is there not a simple way of testing a workflow service just as with WorkflowInvoker.Invoke?


have a look at link text


See How to Unit Test a WorkflowService


Depends partly on how you factor things.

You can unit test your application logic by wrapping it up as a custom activity with InArguments and OutArguments that are set by the service. (You can pass arguments when use WorkflowInvoker.)

In order to unit test your service as a whole, I don't know a good way to do this other than actually creating the service host.

Also, if your application logic depends on Pick activity or Parallel receive, you probably want to do something more advanced in order to test the different execution paths of the Pick/Parallel scenario.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜