Blog Archives

Practical .NET Unit Testing – Free paper released

I’ve been working on a unit testing paper that sums up my experience in unit testing, and discusses some of the core information that I feel is important about the subject. It’s very much a work in progress, but I

Speaking at Day of .NET at Fox Valley Tech

If you’re interested in hearing about writing practical unit tests in .NET, I’ll be speaking at the Fox Valley .NET user group “Day of .NET” event May 9th! Here is the synopsis for your reading pleasure: Want to learn how

Unit Testing a LINQ to SQL or EF Query

I was writing a slightly non-trivial method to query a database to find a record matching a certain time range. It quickly became clear that it would be nice to write some automated unit tests against it. Integration tests would

Screencast – Unit testing with real DataSets

As I’ve mentioned before, I wrote a small utility for running a SQL query, and returning the results as an XML serilialized DataSet. I created a quick screencast to demonstrate how you go about using this utility. I’m new to

Design your classes for their consumer

I’m going to describe a methodology that will help you save time by writing better classes, and will help simplify your life by allowing you to solve problems with a top-down approach. Developers such as myself often have a tendency

A Dependency Injection example with Spring.NET

As requested, here is a real world example of how I used dependency injection to simplify a project, increase modularity, and subsequently increase testability. Here’s the project. I have a successful website called SimpleTracking.com which allows you to track packages

Unit tests are for functionality, not code!

Shawn has an interesting post where he talks about why 100% unit test coverage should be one of your goals. I agree 100%. I’m not sure why anyone would say that you shouldn’t be testing your properties. Don’t you want

Do you really need a data access layer with LINQ?

Lately I’ve been giving a lot of thought to using LINQ to access my database instead of using NHibernate. I’ve been a little confused as to how LINQ would work in a data access layer, but I’m starting to think

.NET XML DataSet Generator from a SQL Query

As promised, I’ve now made the .NET XML DataSet Generator available on Google Code. If anyone can think of a better name for the project, please let me know! It’s really hard to convey what it actually does. On the

DataSet XML serializer utility for unit testing

Quite a while ago I wanted to do some unit testing with DataSet’s and DataTable’s as input. In code, there isn’t really an easy way to generate them, especially if you want them to be a realistic subset of the