Vincent Massol wrote:

> > > > Premise 4, Solution 2a : raise an exception saying that the parameter
> should
> > > > have been defined in web.xml
> >
> >  +1 - I like strict :) definitely throw an exception - after all, in
> > this case, all the test writer needs to do is move the offending method
> > call into the "beginXXX" method for the testcase.
> >
> 
> I'm not sure we are speaking about the same thing ...

yes I think I've misunderstood something here.

> What solution 2a means is that be it a MO or IC test, the user will have to
> define the init config in web.xml. In "standard" MO style, you are able to
> define these init config in your testXXX() method using calls on a
> MockContainer implementation, like MockContainer.setInitParameter("xx",
> "yyy");
> What we are saying with this option is that with Cactus MO style it won't be
> possible, the user will have to use the web.xml to define these config data.

Ok. I'm getting myself confused with a "MockREquest.setParameter" call -
something that for an IC test you need to call in the beginXXX method,
but with MO it wouldn't matter - you could call it in beginXXx, in
setUp, in testXXX, wherever. That's what I meant by the "move offending
method to beginXX" above...

Agreed for the container initialisation you would need web.xml setup for
IC, and you might as well keep it like that for MO to keep things
consistent - that's the idea right?

> 
> BTW, I still don't understand the issue about web.xml getting in the way ...
> ! It is not the production web.xml, it is only the test web.xml !
> 

not sure i understand right now... it's nearly home time. ;0
> -Vincent

--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd

Reply via email to