Attempt to remake the Microsoft Exchange web service

I am trying to test my application using the Microsoft Exchange Web Service DLL to access the Exchange Server.

I want to isolate my application from the need to use a real Exchange server in my tests, and I realized that I can not scoff at the Exchange DLL ...

Another problem is that I cannot change working code that does not use an interface or adapter to access the Exchange Web Service DLLs, so I cannot just drown it out ...

In my research, I found a Microsoft Moles framework that allows me to Mole and replace any method (even constructors) with my own delegate. However, I found that in the application code we use Microsoft internal data types (such as EmailMessage ), which do not allow much freedom to create or modify them.

Does anyone have any suggestions on what I can do in this situation?

Thank.

+3
source share
1 answer

If I try to hide the facade email exchange and replace all the code that directly refers to the exchange with calls to this facade.

Faking the facade is much easier than the mocking exchange itself.

, - , .

+2

All Articles