You might want to check out JUnit mock objects -->
http://www.junit.org/news/extension/mock_objects/index.htm
About running JUnit inside an EJB container -->
http://jakarta.apache.org/cactus/

Aslak

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of David
> Jencks
> Sent: 23. februar 2002 03:49
> To: [EMAIL PROTECTED]
> Subject: Re: [Xdoclet-devel] Junit on Entity bean
>
>
> This is just my not very knowledgeable opinion, but I don't think it is
> worthwhile spending a lot of time trying to test functionality of
> generated
> code, or testing ejbs outside a container.  For xdoclet I think the
> critical parts are regression tests of generated stuff against
> hand-checked
> samples.
>
> Dain Sundstrom wrote a way of running junit tests inside an ejb server.
> I'm not sure how it works, but he is using it in the jboss tests of cmp2.
> The project is called ejbunit I think and is on sourceforge, as well as a
> jar in jboss somewhere.
>
> david jencks
>
> On 2002.02.22 19:52:29 -0500 Vincent Harcq wrote:
> > Hi,
> > I just commit sth that permit to specify in build (and not in sources)
> > the cmp version to use.
> >
> > The idea is that I will generate CMP 1.1 classes for samples, then I
> > will be able to instantiate, say CustomerCMP, sets some fields on it
> > calls getData() and see if super classes attributes were set, etc...
> > Next step would be to create a hack ou Util classes that do'nt go to
> > JNDI but return a fake implementation of Home, this one in turn will
> > return fake implementations of remote/local interface that operates on
> > instances of the CMP class directly.
> > The persistence of data, would be made into a file (Serialization?) or
> > sth (no not a database : I want this quick, simple, in a word XP!)
> > The unit test would need to create() data (SetUp) before being able to
> > "finder" the bean.  (tearDown would remove() so delete my tmp files)
> > ejbLoad, ejbStore,... Would be called when needed (more thinking here)
> >
> > That makes a long time I was thinking of unit testing EJBs outside a
> > container : Application level unit testing
> > The idea is "I am testing MY beans, I don't care about testing container
> > responsabilities (transaction,...).  The DD ?  I know they are good:
> > they comes from xdoclet ;)"
> >
> > For unit testing ejb inside a container other tools exists and are
> > necessary as well but are complementary, more low level : transaction,
> > performance, ...
> >
> > This will of course also permit to unit test what xdoclet generates
> > (from samples or enhanced ones...)
> >
> > What do you think ? I am a bit tired, I maybe miss a point.
> > Do you know anywhere I can find something similar to this.
> >
> > Going to bed,
> > Vincent
> >
> >
> >
> > _______________________________________________
> > Xdoclet-devel mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/xdoclet-devel
> >
> >
>
> _______________________________________________
> Xdoclet-devel mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/xdoclet-devel


_______________________________________________
Xdoclet-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-devel

Reply via email to