How to make fun of a web service call in a WF workflow?

I am implementing a WCF web service based on WF. This web service consumes other web services for which I am not responsible. So basically my service workflow contains a few submit actions.

I follow the TDD approach, so service implementation should be covered by unit tests. I want to check the correctness of calling third-party services.

In the case of a non-working process, I would mock external services through NMock. But in my case, I can’t control the instance of the workflow instance, and I don’t know how to trick the "Submit" actions to use mock objects instead of the endpoints of real services.

Although the modular processes and actions for testing the elements of the article on MSDN mentions mocks I could not find any complete example of bullying of the remote part of the Send action.

Any idea on how to do this?

+3
source share
2 answers

try the moles framework. http://research.microsoft.com/en-us/projects/pex/

There are examples of how to mock the sharepoint service. I believe the same trick should apply to the WF workflow.

sqlconnection, Entity, -, . , .net.

0

ServiceAgents - .

, .

, .

( ), . .

0

Source: https://habr.com/ru/post/1758152/


All Articles