2010/10/27 Cédric Beust ♔ <[email protected]>: > > On Wed, Oct 27, 2010 at 3:55 AM, Mark Volkmann <[email protected]> > wrote: >> >> That reminds me of JUnit 4. Supposedly the @Test annotation is a good >> thing. I don't see how the ability to create test methods whose names >> do not begin with "test" is a good thing. > > It gives you more flexibility to name your methods and it also lets you > specify @Test at the class level to include all public methods as test > methods (that's a TestNG feature though, I don't think JUnit supports it). > It also enables inheritance (extend a base class with a @Test method and all > your public methods automatically become test methods). > The "test" introspection thing has always been a hack because we had nothing > better. Now we do.
I wonder though if most people still give their test methods names that begin with "test". I do. One reason is so the test methods stand out in my IDE within the list of methods in the class. I want some way to visually distinguish between test methods and utility methods within the test class. -- R. Mark Volkmann Object Computing, Inc. -- You received this message because you are subscribed to the Google Groups "The Java Posse" 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/javaposse?hl=en.
