You cannot make fun of a signed DLL. (If you could be hired by the mafia ...)
Discard the code that accesses the code in this DLL.
Create a facade (if you donβt have one) that wraps access to methods in the Exchange dll. Then in your tests you can provide a mock-up facade.
Good design practice protects your code from any third-party code (assemblies, web services, management) using facades / wrappers. This minimizes the risk of exposure when changing the code of a third party, i.e. updating to a newer version of the dll (necessary changes will only affect the facade) and help with testing.
Jakub konecki
source share