Monthly Archives: March 2007

Changing of the Mock Tool

I’ve just recently started using NMock2 on a new class library that I am building, which makes use of several external resources (e.g. mail server, FTP, etc.). So, in writing my unit tests, it made sense to use some type of mock object so that I was not dependent on these external resources during testing.

However, because my assembly is strongly-named, I discovered that I can’t use the NMock2 library because a strongly-named assembly can only reference other strongly-named assemblies – and for some reason, NMock2 is not strongly-named. There have been a couple requests, but they all seem to have fallen on deaf ears – or nobody is at the wheel steering this project anymore.

So I am left looking for other options. I thought I’d give Rhino Mocks a try after hearing about it from Tim. It looks promising…