Hi Pratima,
----- Original Message -----
From: "Gogineni, Pratima" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 05, 2001 5:31 PM
Subject: RE: [cactus] Supporting security in Cactus and Cacus Design (WAS
Re: Cactus with container security)
> Thanks for the quick reply Vincent. I guess the quickest way for me is to
> use the mock implementation.
>
which one ? You mean writing your own class that extends Cactus
HttpServletRequestWrapper and adds new methods and overload the security
methods ?
> Atleast in my own case I would prefer to go with the mock object
> implementation - I have been using the struts framework to build my
> application and have a proliferation of action classes & I check for the
> user in the perform method of each of them. So this login request would
have
> to be sent before each test method.
> Only in test cases where I want to test the login process itself would I
> like to send the request to the container.
>
ok
> I guess essentially what I am saying is it would be good if cactus
supported
> both in container and mock object testing and leave it upto the programmer
> to figure out which is appropriate in a particular case.
>
I agree with you. However, it is not that easy to integrate both and I am
still struggling to find a way of doing so ... What I mean by integrate is
simply to have a common way of writing a test case which could then be run
either in-container or mock style. If you have ideas please do submit them
on the list.
> Also I could think of using solution 1 in another way - Add the ability to
> have multiple instances of the redirector servlet each configured in a
> different way and in the setup /beginxxx methods chose which of the
> redirector servlets you would like to have handle this test case. This way
I
> can use the servlet without security enabled for some methods and security
> enabled for others.
>
yes, I guess that will work too ...
> I guess generation step will add more flexibilty though ....
>
To tell the truth, I hate generation ... If I can do without, I'll prefer
100 times. Generation will cause problem of integration with IDEs and is
always more complex. This was just an idea and is absolutely not something
committed !
> Thanks
> Pratima
Thanks
-Vincent