jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: EJB Test Design help?
Date Mon, 28 Jun 2004 19:24:55 GMT


> -----Original Message-----
> From: Mick.Knutson@wellsfargo.com [mailto:Mick.Knutson@wellsfargo.com]
> Sent: lundi 28 juin 2004 18:40
> To: cactus-user@jakarta.apache.org
> Subject: RE: EJB Test Design help?
> 
> I also want to know how I can run an EJB test that saves to the DB, but
> then
> roll back the data after the test is complete?

That's independent of Cactus. Simply roll back the transaction for
example... (in your tearDown() method for example).

See
http://blogs.codehaus.org/people/vmassol/archives/000170_using_rollbacks_for
_unit_testing_database_code.html for some more thoughts on the rollback
strategy...

-Vincent

> 
> 
> 
> -----Original Message-----
> From: Mick.Knutson@wellsfargo.com [mailto:Mick.Knutson@wellsfargo.com]
> Sent: Monday, June 28, 2004 9:25 AM
> To: cactus-user@jakarta.apache.org
> Subject: EJB Test Design help?
> 
> 
> I need to see if someone an help me to design my Cactus tests for my
> EJB's.
> I have a composite DTO that has Entities that match:
> 
> CreditAppDto
> |--> BusinessCard1
>     |--> Bank Account 1
>     |--> Bank Account 2
> |-->BusinessLine
> |--> Guarantor[1..*]
> 
> Now, this DTo get saved all at once in my Use Case.
> 
> I have spit up the CreditApplicationManager methods into smaller chunks:
> 
> CreditApplicationManager.createCreditApplicaton(...)
> CreditApplicationManager.createBusinessCard(...)
> CreditApplicationManager.createBusinessLine(...)
> CreditApplicationManager.createGuarantor(...)
> 
> But, they all still get called from:
> CreditApplicationManager.conclude(CreditApplicationDto)
> 
> Any design thoughts on how to test this scenario?
> 
> 
> ---
> > Thanks...
> > Mick Knutson
> >
> > 525 Market Street, SF, CA  94103
> > (415) 222-1020
> > Mick.Knutson@WellsFargo.com
> > MAC A0103-223
> ---
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cactus-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: cactus-user-help@jakarta.apache.org



Mime
View raw message