Return-Path: Delivered-To: apmail-jakarta-cactus-user-archive@apache.org Received: (qmail 95940 invoked from network); 13 Dec 2002 15:05:36 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Dec 2002 15:05:36 -0000 Received: (qmail 16278 invoked by uid 97); 13 Dec 2002 15:06:26 -0000 Delivered-To: qmlist-jakarta-archive-cactus-user@jakarta.apache.org Received: (qmail 16232 invoked by uid 97); 13 Dec 2002 15:06:24 -0000 Mailing-List: contact cactus-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Cactus Users List" Reply-To: "Cactus Users List" Delivered-To: mailing list cactus-user@jakarta.apache.org Received: (qmail 16213 invoked by uid 98); 13 Dec 2002 15:06:23 -0000 X-Antivirus: nagoya (v4218 created Aug 14 2002) Message-ID: <6B6C3C9FA532D311B6D4009027541B4502E3F1D0@ndex1.ind.ehpt.com> From: "Siddhartha Chandurkar (EHS)" To: "'Cactus Users List'" Subject: RE: Input for Code Generator Date: Fri, 13 Dec 2002 20:32:20 +0530 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi Matt, The Jenertor already supports regeneration, It writes down the code to initialize the all types of Beans. In 1.0 the Jenerator will support generation of Unit tests for normal classes. Now it mainly focuses on EJB's. The feedback i wanted regarding do you miss something in the existing code generators. regards, Siddhartha -----Original Message----- From: Matt Raible [mailto:matt@raibledesigns.com] Sent: den 13 december 2002 15:51 To: 'Cactus Users List' Subject: RE: Input for Code Generator Try Junitdoclet - it generates Junit-based testcases from your existing directory. And it even adds new test methods when you add them to your class, and doesn't overwrite you modified methods. With Cactus, it just stops examining the class once it sees it extends ServletTestCase or whatnot. http://junitdoclet.org I'm using it on my project and it works pretty slick. You can see it's use in an Ant Task by downloading the source to my sample app on security from http://raibledesigns.com/downloads/index.html HTH, Matt > -----Original Message----- > From: Mark Wehby [mailto:mwehby@TRIPLEI.COM] > Sent: Friday, December 13, 2002 7:46 AM > To: Cactus Users List > Subject: Re: Input for Code Generator > > > Siddhartha, > I have just started looking at and using Jenerator. I > noticed it only generates Unit test code for EJB's. It would > be nice if it could generated unit tests for any given class. > > Thanks, > Mark Wehby > > > > ----- Original Message ----- > From: "Siddhartha Chandurkar (EHS)" > > To: "'Cactus Users List'" > Sent: Friday, December 13, 2002 7:49 AM > Subject: Input for Code Generator > > > Hi Guys, > I am working on the 1.0 version of the Jenerator which is > a Multi Purpose Code Generator. Apart from many other things > it generates Unit Test code. I would like to improve on the > Unit Test generation feature. I would be really gratefull if > you can send me some suggestions. To download and see the > current Unit Tests generation . Please visit > http://www.visioncodified.com. > > tbanks & regards, > Siddhartha > > -----Original Message----- > From: Matt Raible [mailto:matt@raibledesigns.com] > Sent: den 13 december 2002 08:42 > To: 'Cactus Users List' > Subject: RE: Is it possible to test for exceptions? > > > Great - thanks! > > > -----Original Message----- > > From: Koegel, Michael > [mailto:Michael.Koegel@partner.commerzbank.com] > > Sent: Wednesday, December 11, 2002 3:34 AM > > To: Cactus Users List > > Subject: AW: Is it possible to test for exceptions? > > > > > > Hi, > > > > I normally do like this. Which saves the flag. > > > > try{ > > //do stuff that should throw exception > > fail("My Message"); > > }catch(ExpectedException e){ > > //do asserts for expected Message or whatever > > } > > > > --MK > > > > -----Urspr|ngliche Nachricht----- > > Von: Erik Hatcher [mailto:lists@ehatchersolutions.com] > > Gesendet am: Mittwoch, 11. Dezember 2002 11:04 > > An: Cactus Users List > > Betreff: Re: Is it possible to test for exceptions? > > > > duh, obviously the below logic is not quite right since it would > > always fail. but you could set a flag in the catch and check it > > afterwards, or > > return within the catch if thats the only thing that test was doing. > > you get the idea! > > > > Erik Hatcher wrote: > > > This is normally done with a construct like this: > > > > > > try { > > > // stuff that causes expected exception > > > } > > > catch (...) { > > > // expected > > > } > > > fail("did not get exception expected"); > > > > > > > > > > > > > > > Matt Raible wrote: > > > > > >> Is it possible to test for exceptions? I want to verify that an > > >> exception is thrown when a user is not found - right now my test > > >> fails. > > >> > > >> I'd love an assertException or something of that sort ;) > > >> > > >> [junit] Testcase: > > >> testGetUser(org.apache.persistence.ApplicationDAOHibernateTest): > > >> Caused an ERROR [junit] > > org.apache.persistence.DAOException: User not > > >> found in database! [junit] org.apache.persistence.DAOException: > > >> org.apache.persistence.DAOException: User not found in database! > > >> [junit] at > > >> > > org.apache.persistence.ApplicationDAOHibernate.getUser(Applica > > tionDAOHib > > >> ernate.java:74) > > >> [junit] at > > >> > > org.apache.persistence.ApplicationDAOHibernateTest.testGetUser > > (Applicati > > >> onDAOHibernateTest.java:54) > > >> [junit] at > sun.reflect.NativeMethodAccessorImpl.invoke0(Native > > >> Method) > > >> [junit] at > > >> > > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess > > orImpl.jav > > >> a:39) > > >> [junit] at > > >> > > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth > > odAccessor > > >> Impl.java:25) > > >> [junit] Caused by: org.apache.persistence.DAOException: > > User not found > > >> in database! > > >> [junit] at > > >> > > org.apache.persistence.ApplicationDAOHibernate.getUser(Applica > > tionDAOHib > > >> ernate.java:60) > > >> [junit] ... 15 more > > >> > > >> > > >> [junit] TEST org.apache.persistence.ApplicationDAOHibernateTest > > >> FAILED > > >> > > >> Thanks, > > >> > > >> Matt > > >> > > > > > > > > > -- > > > To unsubscribe, e-mail: > > > > > > For additional commands, e-mail: > > > > > > > > > > > > > > > > > > -- > > To unsubscribe, e-mail: > > unsubscribe@jakarta.apache.org> > > For > > additional commands, > > e-mail: > > > > -- > > To unsubscribe, e-mail: > > unsubscribe@jakarta.apache.org> > > For > > additional commands, > > e-mail: > > > > > > -- > To unsubscribe, e-mail: > unsubscribe@jakarta.apache.org> > For > additional commands, > e-mail: > > -- > To unsubscribe, e-mail: > unsubscribe@jakarta.apache.org> > For > additional commands, > e-mail: > > > -- > To unsubscribe, e-mail: > unsubscribe@jakarta.apache.org> > For > additional commands, > e-mail: > -- To unsubscribe, e-mail: For additional commands, e-mail: -- To unsubscribe, e-mail: For additional commands, e-mail: