A while back, I was on a project where it looked like inheritance would help us reduce our unit test code base for a couple of scenarios. However, we ran into some oddities with setup and teardown methods, but we never got around to isolating it as we had other, more important stuff to address. Well, I had a couple of minutes over lunch to do some investigations, and this is what I came up with.

The key point is that NUnit runs both the setup and teardown methods from the base class, but the add-in doesn't. So...who is right? Well, it depends. I haven't dug into the source code just yet, but here's some Reflection code that might shed some light on the problem:

In other words, based on how you handle the list that comes back from GetMethods() can change your results significantly. It's possible that NUnit and NUnitAddIn handle the gathering of unit tests (and the related setup and teardown methods) in a different manner, but it would be nice if they were both consistent.