jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Wehby" <mwe...@TRIPLEI.COM>
Subject Re: Input for Code Generator
Date Fri, 13 Dec 2002 14:45:47 GMT
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)" <Siddhartha.Chandurkar@ehs.ericsson.se>
To: "'Cactus Users List'" <cactus-user@jakarta.apache.org>
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:
> > <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail:
> > <mailto:cactus-user-help@jakarta.apache.org>
> >
> >
> >
>
>
> --
> To unsubscribe, e-mail:
> <mailto:cactus-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <mailto:cactus-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:
> <mailto:cactus-user-> unsubscribe@jakarta.apache.org>
> For
> additional commands,
> e-mail: <mailto:cactus-user-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>

--
To unsubscribe, e-mail:
<mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:cactus-user-help@jakarta.apache.org>


--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message