WCF MSMQ Unit testing

馋奶兔 提交于 2019-12-10 10:27:23

问题


I have created a custom msmq service with WCF, which uses a custom binding as it needs to do some custom logic at the channel layer, where it calls another wcf service. The service is going to be a core pience of functionality for our systems for at the the next few years. i want to do what I can to make sure the service is robust, but, i'm not sure where to start. Ie testing the response, should I create a mock queue object? how do I test the service is calling another service ?


回答1:


Best way I have found to unit test msmq services is to actually unit test the service implementation, then do an integration test using msmq with a mock repository. To see if writes are working.



来源:https://stackoverflow.com/questions/2691066/wcf-msmq-unit-testing

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!