Recently at work, we’ve really started to embrace TDD (and BDD). As a team, it helps us write much cleaner, more efficient code. I’m not going to preach forever about the benefits of TDD. There are thousands of other blog posts out there beating this topic to death. One of the ways that we communicate with our databases at work is by using Rob Conery’s ISession interface. We have an implementation of this interface for Entity Framework 4, and it works beautifully. However, given that this interface is super generic, it’s less than obvious how you would mock such a thing. Here’s the ISession interface in all its glory:
Hi! My name is Scott. Welcome to my place on the web. I currently work in St. Louis, Missouri as an ASP.NET developer, although I tend to use whatever language tickles my fancy at the moment.