I have several things that I haven't figured out how to test because they are tightly integrated to the WCF pipeline. Maybe I should ask how to integration test? Here's my situation, two parts:
1) To bootstrap my DI (I'm using Unity Container), I have implemented a custom ServiceHostFactory. In this service host factory, I pass in my bootstrapper code (e.g. for AutoMapper and other things).
How do I test all these items get called and that my configurations are correct? Granted, as I type this, maybe this should be considered integration testing? How do I host my service and test it with my tests?
2) I also have a global error handler for my services. I'd like to write a mock test to throw an exception and verify that the global error handler is in fact catching them.
Thanks!
Update: Maybe my question isn't very clear, but after some more googling, I think this is what I'm after
Additional thoughts or pointers appreciated. Haven't tried it yet as I'm not sure which direction I should be going.