Add new SoapResponseStrategy to help in predetermined test cases
See original GitHub issueThanks for your work, really amazing.
I need to write some Integration test cases depending on castlemock, so that my application will call castelmock to return different each time for the same specific web service operation.
The point is, I cannot depend on both the existing SoapResponseStrategy
strategies (RANDOM
and SEQUENCE
), I cannot depend on RANDOM
because my test cases need to know the result ahead so I could assert my code, and I cannot depend on SEQUENCE
for many reasons one of them it is not a good idea to have test cases run in a certain order, they should run independently.
The suggested solution is to return different mock responses based on different input (XPath could used here).
BTW, SoapOperationStatus.ECHO
is not helpful hence my application is sending real SOAP request message, and if I changed it to send some SOAP response to get it back in the request, I then changing in actual application code.
Thanks.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
Thank you @mhewedy for you contribution! Great work!
Best regards, Karl Dahlgren
Hi @mhewedy! Thank you using Castle Mock, and more importantly, thank you your amazing suggestions. XPATH has long been on my list to do. I really like your approach. Looks very straightforward. If you want, we can do this in two ways:
What would you prefer? Once again, thank you very much.
Best regards, Karl Dahlgren