sfeldman.NET

.NET, code, personal thoughts

  • Mock Implementing Multiple Interfaces

    One of the recent tests I had, I had to deal with the fact that a dependency object injected into system under test object will be casted to some other interface (known to be implemented) and used. Moq has some documentation on it, but it was a bit misleading. QuickStart wiki showed an example below:

  • Troubleshooting SSL Connectivity

    While integrating two clients and working on two way authentication, I had to troubleshoot SSL connectivity. Configuration file was my best tool I could use. There are a couple of things I used, and probably there’s a lot more I am not aware of.

  • StructureMap & Mocking

    I really like working with StructureMap. Today I had to write a quick Factory that would leverage StructureMap to create returned instances. The Factory would look like this:

  • ILMerge as NAnt Task

    I needed to merge a few a few assemblies into one, and tried pretty much what the author of this blog did. I also wanted to be able to “hide” the namespaces merged into main assembly, so that in case there are 2 identical classes in final assembly, only the class from the primarily assembly would be showed by Visual Studio. In my case, it was custom Logger vs. log4net Logger, which I wanted to “hide”.

  • Working in Sandbox

    As I have already mentioned, I am involved in a project that uses BizTalk 2009. With this beast, you have to develop on the machine that has BizTalk installed and configured. This is vey unfortunate, especially when so many things can go wrong. From my experience in the past I have decided to work in virtual machine. Boy that paid off back so quick. While working on a custom adaptor, something went wrong during deployment and BizTalk 2009 was not responsive anymore. But I had nothing to worry about – I had a snapshot I could go back to.

  • BizTalk Custom Pipeline

    I am starting a project that involves a lot BizTalk 2009. Since this is a completely new territory for myself, I decided to blog about it. There a lot of resources available out there, especially from MSDN.