openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Linskey" <plins...@bea.com>
Subject RE: How to unit test the Enhancer?
Date Mon, 22 Jan 2007 19:29:54 GMT
You could also just test that the class implements
org.apache.openjpa.enhance.PersistenceCapable. Such a check assumes that
the OpenJPA enhancement is happening correctly under the covers, but
should be a good first approximation at least.

FTR, yes, there are tests for this stuff. Sadly, the majority of the
Kodo test suite has not yet made it into OpenJPA.

-Patrick

-- 
Patrick Linskey
BEA Systems, Inc. 

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it. 

> -----Original Message-----
> From: Rahul Thakur [mailto:rahul.thakur.xdev@gmail.com] 
> Sent: Sunday, January 21, 2007 11:00 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: How to unit test the Enhancer?
> 
> Hi Craig,
> 
> Thanks for that; that was closer to what I was I looking for 
> in OpenJPA, 
> but I haven't found anything. Something I could use to verify 
> in my own 
> unit test.
> 
> Any other pointers, anyone?
> 
> TIA,
> 
> Rahul
> 
> 
> ----- Original Message ----- 
> From: "Craig L Russell" <Craig.Russell@Sun.COM>
> To: <open-jpa-dev@incubator.apache.org>
> Sent: Monday, January 22, 2007 7:15 PM
> Subject: Re: How to unit test the Enhancer?
> 
> 
> > Hi Rahul,
> >
> > You might look at the work-in-progress going on at Apache 
> JDO http:// 
> > db.apache.org/jdo/ and http://wiki.apache.org/jdo/ProjectStructure. 
> > The JDO 1.1 project includes an enhancer verification 
> program that is 
> > not yet updated for JDO 2.0, but it should give you some ideas on 
> > what technology exists.
> >
> > If you need more details after looking at the project, please feel 
> > free to follow up on the jdo-dev alias.
> >
> > Regards,
> >
> > Craig
> >
> > On Jan 20, 2007, at 5:49 PM, Rahul Thakur wrote:
> >
> >> Hi,
> >>
> >> I'd like to put together a couple of unit tests for the Enhancer 
> >> mojo. For this I had a look at openjpa-kernel module where the 
> >> PCEnhancer is located but could not find any tests.
> >>
> >> How can I test if a persistence-enabled class has been enhanced as 
> >> expected from a unit test? Appreciate any pointers.
> >>
> >> Cheers,
> >> Rahul
> >
> > Craig Russell
> > DB PMC
> > clr@apache.org http://db.apache.org/jdo
> >
> >
> > 
> 
> 

Mime
View raw message