Make the class abstract. [TestFixture] is optional in v3. MbUnit guesses that a class is a test fixture if it is not abstract and contains tests.
Jeff. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Mark Kharitonov Sent: Sunday, August 23, 2009 1:48 AM To: MbUnit.User Subject: MbUnit How to correctly implement a generic base type generating dynamic tests for some derived type? Hi. Given: * A generic base type, let us say BaseDynamicEntities<T>, which is NOT marked with [TestFixture]. It does implement a static test factory which generates dynamic tests using the generic type parameter T as the source of some vital information. * A non generic test fixture DynamicEntities deriving from BaseDynamicEntities<T>, passing some concrete type in T. Problem: When run with the Gallio task, the task wants to run BaseDynamicEntities<T> as though it was a test fixture, although it is not marked so. Naturally it fails. The problem is that the whole task is failed, despite the fact that all actual test fixtures do pass. The report created by the same run, on the other hand, is not red, but rather gray. It indicates that the BaseDynamicEntities`1 is "skipped because it is parameterized but no data was provided." The net effect is that msbuild fails, which is very wrong. My question is why BaseDynamicEntities<T> is considered to be a test fixture in the first place? After all, it is not attributed with TestFixture and has no test fixture base types. How can I prevent the unit test framework from treating it as a test fixture, yet preserving all the dynamic test generation code in it? BTW, BaseDynamicEntities`1 is missing in the summary. One must browse the details to look for it - this is the issue I have reported in one of the previous posts. Jeff, I will send the repro steps to your google account right away. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "MbUnit.User" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/mbunituser?hl=en -~----------~----~----~----~------~----~------~--~---
