I have a set of basic tests that are used to test several implementations of an interface. The way I worked was to create a basic text element with the [Ignore] attribute.
[TestFixture] [Ignore] public class BaseTests {
And then I write a subclass for each interface implementation:
public class ConcreteThingTests : BaseTests { public override ITestableThing GetConcrete() { return new ConcreteThing(); } }
This works well, since I have all the tests for ALL implementations in one place, and the subclasses simply define the implementation.
The problem is that I have to put the [Ignore] attribute in the base class, or NUnit will try to run the tests (and crash).
Because of this, my test results are always clogged with a set of tests with ignoring, and although this is not very important, I thought that for this there might be a better template that avoids ignoring the tests.
So am I implementing inheritance inheritance incorrectly?
source share