views:

22

answers:

0

I have Web Application that has 2 sets of services. One set is business services like UserService and another set that is utility services like EmailService. How the business services connect to the utility services is through NServiceBus. How do you perform integration tests in this scenario? What I've done right now is that I broke out the integration test to 2 unit tests. First is testing the business service and then mock/verify out the NServiceBus send. Second unit test is on the utility service and then mock/verify the email sending. As you can tell, this isn't optimal at all. Current we have 2 instances of NServiceBus -- one as client and one as server (server has addition of handlers). This work in normal, non-test mode (since client is under the context of IIS and the server is a standalone app) but when I try to do this in test, it seems like I can't run two instances? Any advice?