On 8/18/06, Mike Kienenberger <[EMAIL PROTECTED]> wrote:
AbstractJsfTestCase.suite() exists and cancels out the ability to
determine the tests by reflection.
public static Test suite() {
return (new TestSuite());
}
This is quite annoying and cost me an hour's time trying to determine
why switching from extending TestCase to extending AbstractJsfTestCase
mysteriously broke everything.
Is there a reason why this method exists? I see a comment in the
MyFaces tests at
myfaces-api:javax.faces.convert.DateTimeConverterTest.
public static Test suite() {
return null; // keep this method or maven won't run it
}
Does maven require suite() to exist and then ignores the result?
That's broken and should be fixed, not catered to.
Adding code like the following to each subclass does work, but should
not be necessary.
public static Test suite() {
return (new TestSuite(NumberConverterTest.class));
}
At some point in my use of JUnit (early 3.x versions), I was having problems
with abstract base classes that didn't have a suite() method ... IIRC, any
test methods of the base class were getting skipped. Thus, I made it a
habit in my own practice to always require concrete classes to provide their
own suite() methods. Maybe things are different with 3.8.1. I'll
experiment with removing this to see if it breaks anything.
Craig