I'm using NUnit 2.5.3, but if a more recent version of NUnit solves my problem, it won't be an issue to upgrade.
We have a couple of different categories for tests. Different categories of tests will be run during different flavours of build (fast running unit tests for checkins, all unit tests and other tests with external dependencies (database etc.) for overnighters etc.). Divorcing the true unit tests and the tests with external dependencies into different assemblies is a longer term objective, but I'll still want to enforce categories on the tests.
I want to ensure that all test methods have a single CategoryAttribute defined with a valid category name. A valid category name would be one from a list that I could define. However, just enforcing a Category on each test method would be a step in the right direction.
Does NUnit supports this kind of behaviour out of the box? Is there another NUnit attribute I can use other than CategoryAttribute which supports that kind of enforcement? Or is implementing a custom build step which checks the assemblies via reflection the way to go?