sfeldman.NET
.NET, code, personal thoughts
-
Mocking Extension Methods
Daniel Cazzulino had a very helpful post about how to mock extension methods. The only part I don’t like about this method is the fact you have to make internals visible to the test assembly using an assembly directive:
-
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:
-
UML and Sequence Diagrams Online Generators
I am a fan of quick tools that help you sketch out thoughts. These two do exact that type of work.
-
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.
-
Syntactic Sugar
-
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.
-
Lost Generation – Really Good