Hey Nicholas, you beat me to answer Phil's message ! :-)
IC will still be there in Cactus. The idea is just to also be able to write
MO tests when needed because they are also really useful. Doing Mock Objects
for the servlet API + Tag libs + servlet filters seem quite feasible. For
EJBs, I still don't know and Alex is testing this ... we won't offer an EJB
container MO implementation to start with in Cactus v2.0 but it may be added
in the future _if_ it is feasible. In the meantime it will always be
possible to use IC to run the EJB tests...
Thanks
-Vincent
----- Original Message -----
From: "Nicholas Lesiecki" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 26, 2001 4:39 PM
Subject: RE: EJB Testing WAS: [Announcement] Mock Object project
> Hmmm, am I missing something here? I have the following code:
>
> private Flyer createFlyer(Integer id, String name, String msg) throws
> Exception {
> FlyerHome home = getHome();
> Flyer flyer = home.create(id, name, msg);
> return flyer;
> }
>
> private FlyerHome getHome() throws Exception{
> Context init = new InitialContext();
> Context cmp = (Context)init.lookup("java:comp/env/bull");
> return (FlyerHome) cmp.lookup("FlyerBean");
> }
>
> That is executed as part of my testXXX methods, and it works just fine
> without any other proxies or classfile editing... In fact I was just about
> to write the list favoring IC testing because of the transparent support
of
> things like JNDI and connection pooling when tests are run in the
container.
> For instance Resin-CMP has advanced support for EJB 2.0, something which
> would be a large project to write MockObjects for, but if I use cactus to
> run the tests in-container, I can test that my code works when integrated
> with the container's services.
>
> Anyway that's my 2 cents.
>
> Cheers,
>
> Nick
>
> -----Original Message-----
> From: Phil Magill [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 26, 2001 4:21 AM
> To: '[EMAIL PROTECTED]'
> Subject: RE: [Announcement] Mock Object project
>
>
> Its import to learn something new everyday....................
>
> -----Original Message-----
> From: Alex Fern�ndez [mailto:[EMAIL PROTECTED]]
> Sent: 26 July 2001 12:23
> To: [EMAIL PROTECTED]
> Subject: Re: [Announcement] Mock Object project
>
>
> Funny thing then.
>
> I learned something new by misreading your mail :)
>
> Alex.
>
> Phil Magill wrote:
> >
> > Nope
> >
> > Its just a class, that in the constructor creates the EJB and each
public
> > method of the class calls the same method on the bean, simple. That way
> the
> > Servletredirector can match up the methods in the testXXXXXX methods.
> >
> > Hope this helps...
> >
> > Phil
> >
> > -----Original Message-----
> > From: Alex Fern�ndez [mailto:[EMAIL PROTECTED]]
> > Sent: 26 July 2001 12:14
> > To: [EMAIL PROTECTED]
> > Subject: Re: [Announcement] Mock Object project
> >
> > Yeah, I understand you're talking about the java.lang.reflect.Proxy
> > class, right?
> >
> > Phil Magill wrote:
> > > Just a note, the Proxy Objects are just wrapper classes for the EJB.
> They
> > > are not part of Cactus, only a name i give to them to make them sound
> > good.
>
>