«Template Method»s [GoF] and Unit Testing
I’m trying to implement a ?Template Method in an abstract base class. I’d like to mark the ?Template Method with the [TestMethod] attribute, and have all the sub-classes run the test method.
However, the Test Manager says that methods of an abstract class can’t be marked as test methods.
My current workaround is having a method in the sub-classes (marked as [TestMethod]) call the ?Template Method of the base class.
Regards,
Martin Rosn-Lidholm

