Patrick,
> -----Original Message-----
> From: Patrick Lightbody [mailto:[EMAIL PROTECTED]]
> Sent: 01 August 2002 10:43
> To: Vincent Massol; 'Cactus Users List'
> Subject: Re: beginXxx and authentication
>
> Looking at the 1.5dev code, I see you are using reflection to call
> clientSetUp and clientTearDown. Any reason for this? Why not do what
ant
> does and just have an empty clientSetUp() and clientTearDown() in
> AbstractTestCase that can be overridden?
Good point. However, there are some subtle points that are better
handled with reflection :
1/ the Cactus code checks for the validity of the clientSetUp()
signature, i.e. it will tell you right away if you have made an error.
So you won't spend 2 hours trying to find why it is not called just
because you used the wrong signature.
2/ It allows for different signatures to be used. For example in the
clientTearDown() there are 3 possible signatures :
clientTearDown(org.apache.cactus.WebResponse)
clientTearDown(httpclient.*.WebResponse)
clientTearDown(HttpURLConnection) - legacy deprecated and should be
removed
Cactus is testing that only one is used at a time.
In addition Cactus do not need to have HttpClient jar in the CP to
compile and is thus independent of HttpClient in that regards.
I'm trying to justify my choices ... :-) ... but I agree that you are
probably right, it might be better not to use reflection ?
Thanks
-Vincent
>
> -Pat
>
> ----- Original Message -----
> From: "Vincent Massol" <[EMAIL PROTECTED]>
> To: "'Cactus Users List'" <[EMAIL PROTECTED]>
> Cc: "'Patrick Lightbody'" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 31, 2002 9:29 PM
> Subject: RE: beginXxx and authentication
>
>
> > I'm almost there ...
> >
> > Funnily you can put the following code in your test case that
extends
> > ServletTestCase and you will have what you want implemented! :
> >
> > protected void runTest() throws Throwable
> > {
> > clientSetUp();
> > runGenericTest(new ServletHttpClient());
> > clientTearDown();
> > }
> >
> > public void clientSetUp()
> > {
> > [...]
> > }
> >
> > public void clientTearDown()
> > {
> > [...]
> > }
> >
> > public void testXXX()
> > {
> > [...]
> > }
> >
> > -Vincent
> >
> > > -----Original Message-----
> > > From: Patrick Lightbody [mailto:[EMAIL PROTECTED]]
> > > Sent: 31 July 2002 18:12
> > > To: Cactus Users List
> > > Subject: Re: beginXxx and authentication
> > >
> > > Sure, that's fine with me, but where are the nightly builds? I
suppose
> > I
> > > could just get off my ass and check out the source too. Can you
email
> > the
> > > list when this feature is in CVS?
> > >
> > > -Pat
> > >
> > > ----- Original Message -----
> > > From: "Vincent Massol" <[EMAIL PROTECTED]>
> > > To: "'Cactus Users List'" <[EMAIL PROTECTED]>
> > > Cc: <[EMAIL PROTECTED]>
> > > Sent: Wednesday, July 31, 2002 5:53 PM
> > > Subject: RE: beginXxx and authentication
> > >
> > >
> > > > Patrick,
> > > >
> > > > I'm not too keen to include it in Cactus 1.4 as it has already
been
> > > > delivered and the only changes that should be allowed between
the
> > beta
> > > > and the release are bug fixes for existing features.
> > > >
> > > > However, I am 100% to include it in 1.5dev, which you can use by
> > using a
> > > > nightly build. Would you have any issue with this?
> > > >
> > > > -Vincent
> > > >
> > > > > -----Original Message-----
> > > > > From: Patrick Lightbody [mailto:[EMAIL PROTECTED]]
> > > > > Sent: 31 July 2002 17:45
> > > > > To: Cactus Users List
> > > > > Subject: Re: beginXxx and authentication
> > > > >
> > > > > > Yes. Although I am not sure the names are right ... :-)
> > > > > >
> > > > > > What about:
> > > > > >
> > > > > > - setUp() : run on server side before each test
> > > > > > - TearDown() : run on server side before each test
> > > > > > - clientSetUp() : run on client side before each test
> > > > > > - clientTearDown() : run on client side before each test
> > > > > >
> > > > > > But yes, it is very easy to implement, simply add the
methods to
> > > > > > AbstractTestCase.
> > > > >
> > > > > Perfect! So when can we expect it? >:)
> > > > >
> > > > > -Pat
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail: <mailto:cactus-user-
> > > > > [EMAIL PROTECTED]>
> > > > > For additional commands, e-mail: <mailto:cactus-user-
> > > > > [EMAIL PROTECTED]>
> > > >
> > > >
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > > For additional commands, e-mail:
> > > <mailto:[EMAIL PROTECTED]>
> > > >
> > > >
> > >
> > > --
> > > To unsubscribe, e-mail: <mailto:cactus-user-
> > > [EMAIL PROTECTED]>
> > > For additional commands, e-mail: <mailto:cactus-user-
> > > [EMAIL PROTECTED]>
> >
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>