Mocking indexed properties with Moq

A coworker of mine (who just got back from the Microsoft MVP events in Seattle, congrats, Matt!) has turned me on to using Moq, which I must say is an impressive mocking framework that has made unit testing notably easier.
Recently I had the need to mock the IRequest interface of the Castle MonoRail framework – [...]

Popularity: 9% [?]

Unit testing an Activerecord domain model with NUnit

[Digression] This post has been sitting in a somewhat unfinished state for a long time. It feels good to finally post it!
In rewriting my baseball game, CSFBL, I made the decision to use Castle ActiveRecord (built on top of NHibernate) to handle the persistence of my domain model. As a result, I needed to find [...]

Popularity: 8% [?]

Unit testing a WMI reboot

The other day I started working on a WMI wrapper that would encapsulate workstation management functionality (starting and stopping services, querying workstations, etc.). Unit testing, as always, is important, but I inevitably came to one problem.
How do you unit test a method that reboots a workstation?
The answer: Run the unit test, and if your machine [...]

Popularity: 7% [?]