cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carsten Ziegeler <cziege...@apache.org>
Subject Re: How to register MockProcessInfoProvider?
Date Wed, 25 Jul 2007 05:50:03 GMT
Grzegorz Kossakowski wrote:
> Carsten Ziegeler pisze:
>> Grzegorz Kossakowski wrote:
>>> Carsten Ziegeler pisze:
>>>
>>> Hmmm, something worth trying. Do you think that changing
>>> o.a.c.environment.* classes (like MockRequest) so they implement Servlet
>>> interfaces and wrapping them in AbstractTestCase won't break anything?
>> Hmm, it *should* not :) But I fear we'll only know afterwards..
> 
> I should have guessed the answer ;-)
> 
> Unfortunately, I face another problem. The only wrapper for
> HttpServletRequest we have is o.a.c.environment.http.HttpRequest but its
> only constructor looks like this:
> 
>   protected HttpRequest(HttpServletRequest req, HttpEnvironment env) {
>     super();
>     this.req = req;
>     this.env = env;
>   }
> 
> It's protected and it demands HttpEnvironment :-(
> Do you think that I should create MockHttpRequestWrapper that would
> extend HttpRequest? It all looks insane for me.
> 
> I'm wondering if previous approach (stub implementations) wouldn't be
> easier...
Hmm, what about mocking HttpServletRequest and HttpServletResponse and
then creating an HttpEnviromnent?
This in turn creates the HttpRequest object.

Carsten


-- 
Carsten Ziegeler
cziegeler@apache.org

Mime
View raw message