Unit Testing Repositories, a rebuttal. Or "How to use proper decoupling to unit test the repository pattern"

For primers, you need to read this post first: http://buffered.io/2008/07/29/unit-tests-boldly-crossing-boundaries-and-gently-breaking-rules/ So the other day I received an email from a group that I am assisting in understanding TDD, Test Concepts, and Separation of Concerns, and they asked, “Is this relevant”? Well here’s the reply to them. Relevant: Yes and no.There’s some good conversation going on…


Silverlight, Faults, and HTTP Status Codes

So plenty has been written about the mismatch in between the Silverlight browser plug-in and WCF messaging with fault use cases over HTTP. For those of you that didn’t know about this then here’s your chance to catchup: According to the documentation, SOAP faults are not supported in the WCF client implementation for Silverlight (even…


Windsor Container Series

It’s no secret that I am a fan of Windsor Container. Here’s a really great series of Advanced Windsor Container Tricks posts that I am linking here for reference Registering Delegates  & A Delegate Factory Facility Auto registration How to resolve arrays How to register and use decorators The Startable Facility The EventWiring Facility How…


Using reflection to determine if an event is static

So if you happen to have an EventInfo class and need to determine if the event is static or instance, it isn’t actually immeidately clear if this is supported. Most of the MemberInfo basic types expose a property named IsStatic that indicates if this member is static or not. If you’ve ever worked with the…


Specifying Specific Dependencies with Windsor Fluent Registration

So it’s become apparent that the documentation (actually concrete examples in my personal opinion) for Windsor Container are a little lacking in the area of showing people how to indicate a specific component instance registration for depenency injection. At least once a week I get an email on the topic asking my “how-to” knowledge. After…


IIS Kerberos Authentication Checklist

Just cross posting so I don’t lose track of this.   http://blogs.msdn.com/b/webtopics/archive/2009/01/19/service-principal-name-spn-checklist-for-kerberos-authentication-with-iis-7-0.aspx


Free Code: Windsor Castle Autofactory Facility

So I recently was working on a system that used extensive need of delayed factory support for dependencies on our components. Effectively if ClassDepending needed to use ClassDepended, the constructor parameter was instead Func<ClassDepended>. This solution was built on Windsor container. Having to remember to register all those custom factories in our bootstrap routines was becoming a huge…


Free Code: WriteOnlySet<T>

So had a fun business entity that needed a write only set of data that contained no duplicates (involved a security auditing trail if you care to know). That’s when I realized we didn’t have anything like this in the BCL. So here’s a fun little ISet<T> implementation that proxies any existing set to provide…


Yes you can execute PARAMETERIZED sprocs with EF Fluent API Code Only (and more!)

This is really an add-on to this post here. Turns out most people were only thinking that you could execute SQL strings only as opposed to detailed parameterized SQL statements. That’s not correct. It’s all supported and approved. Scenario 1. Using Parameterized SQL statements So this covers selects as well as invoking sprocs. If you…


A Case for Test Driven Development

Powerpoint outline for a class I used to teach regarding the topic of TDD. Recently was asked by a coworker to use this and decided to share with the world. Download as use as needed for your own training. Written in 2005 and references Visual Studio 2003 but points still hold. tdd.zip