>-----Original Message----- >From: Geir Magnusson Jr. [mailto:[EMAIL PROTECTED] >Sent: Monday, November 27, 2006 4:27 PM >To: [email protected] >Subject: Re: [classlib][swing] test code changes > > > >Ivanov, Alexey A wrote: >>> -----Original Message----- >>> From: Nathan Beyer [mailto:[EMAIL PROTECTED] >>> Sent: Monday, November 27, 2006 4:04 AM >>> To: [email protected]; [EMAIL PROTECTED] >>> Subject: Re: [classlib][swing] test code changes >>> >>> On 11/26/06, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote: >>>> >>>> Nathan Beyer wrote: >>>>> I made some changes to the swing module's test bits at revision >> 479469 >>>>> and wanted to pass it by the mailing list. >>>>> >>>>> I copied the "javax.swing.SwingTestCase" and >>>>> "javax.swing.BaseSwingTestCase" classes from 'support' to the >> 'swing' >>>>> module. I recall a previous discussion about this, but let me know >> if >>>>> this isn't good. I'll delete the classes from 'support' later. >>>>> >>>>> To get this to work, I also updated the build.xml in 'swing'. >> Instead >>>>> of running all tests that match "**/*Test*.java", I changed it to >>>>> match "**/*Test.java" so that these two classes wouldn't be picked >> up. >>>> Why wouldn't you simply rename them? >>> We could, but just so everyone knows, combined these two classes are >>> used as the base class of essentially every test in the swing module. >>> Also, I'm not sure what would be a better name, as these abstract >>> classes extend TestCase and add "swing" features. >> >> They shouldn't be renamed because these classes have no tests -- they >> are just support classes which provide additional methods, features to >> support Swing testing. And SwingTestCase ensures setUp(), tearDown(), >> and test methods are executed on Event Dispatch Thread. (Swing is not >> thread-safe!) >> Because these classes have no tests, they are marked abstract so that >> they can't be instantiated directly. > >if they have no tests, please don't name them "TestCase". Maybe >"TestSupport" or something. > >> >> I am for keeping the pattern "**/*Test.java". But as far as I remember >> there are several test cases which names ends in "...Tests.java" -- they >> should be renamed. I can provide a list, if necessary. > >I also agree the pattern is fine as "**/*Test.java" but I still find the > above name misleading.
Why? JUnit has TestCase class which serves the base for all the test classes. These two classes enhance JUnit's TestCase with Swing-related features. I think keeping 'TestCase' is reasonable here. I don't mind renaming them though, if everybody considers 'TestCase' as a confusing name. Regards, Alexey. > >geir > >> >> Thank you, Nathan. >> >> >> Regards, >> Alexey. >> >>> -Nathan >>>> geir >>>> >>>>> -Nathan >> >> -- >> Alexey A. Ivanov >> Intel Enterprise Solutions Software Division -- Alexey A. Ivanov Intel Enterprise Solutions Software Division
