Feb 11, 2008 / software ~ .net
NUnit Abuse

I don't know about you, but I sometimes try to stretch my usage of NUnit.

Have you ever done this?

Alt text

Here I'm using NUnit for running ad-hoc housekeeping tasks during development. Like dropping the dev database, or recreating it with no data, or populating it with some test data etc.

Here's the reason why. This particular solution uses Castle ActiveRecord, so NUnit can just call the .NET functions in ActiveRecord for dropping and generating databases etc. When it comes to creating test data, I have .NET code for creating the entities and persisting them ( using an ObjectMother ).

Is there a better way for achieving this than using NUnit? If I were in Ruby I would use Rake, but not sure what to do in .NET.


You may also like...