Good one. +10 > -----Original Message----- > From: Bjoern Kuebler [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, October 23, 2001 5:10 AM > To: [EMAIL PROTECTED] > Subject: [Eap-features] Addition to the New menu: TestCase > > > Hi > > I created the following LiveTemplate for JUnit TestCases: > > import junit.framework.TestSuite; > import junit.framework.Test; > import junit.framework.TestCase; > > public class $CLASS_NAME$ extends TestCase > { > public static void main(String args[]) { > junit.textui.TestRunner.run(suite()); > } > > public static Test suite() { > return new TestSuite($CLASS_NAME$.class); > } > > public $CLASS_NAME$(String s) { > super(s); > } > > public void test$OPERATION$() { > $END$ > } > } > > I assigned to the variable $CLASS_NAME$ the function > className(). Unfortunately, > this is not working because the function className() examines > the declaration > * class _TheName_ ( ... which is not defined in this case, of course. > > My suggestion for this is now, as you already integrated > JUnit into IDEA, to extend your > 'New' context menu (Class/Interface/Package) with 'TestCase' > and let the user specify > a template the same way as it is already possible for clases > and interfaces. > (In Tools/IDE Options/Class Templates). > > -Bjorn > > ===== > "A critic is a man who creates nothing and thereby feels > qualified to judge the work of creative men. There is a logic > in this; he is unbiased - he hates all creative people equally." > - Robert A. Heinlein
************************************ If this email is not intended for you, or you are not responsible for the delivery of this message to the addressee, please note that this message may contain ITT Privileged/Proprietary Information. In such a case, you may not copy or deliver this message to anyone. You should destroy this message and kindly notify the sender by reply email. Information contained in this message that does not relate to the business of ITT is neither endorsed by nor attributable to ITT. ************************************ _______________________________________________ Eap-features mailing list [EMAIL PROTECTED] http://www.intellij.com/mailman/listinfo/eap-features
