Carsten Ziegeler pisze:
Hmm, or the other way round - if the tests would create httpservlet classes first, perhaps the current cocoon environment wrappers could just be used to wrap them.
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?
It's a long time ago....well, the basic idea was that, as Daniel pointed out in the mentioned thread, there are a lot of libraries/code out there which require servlet classes (req/resp/context) are required. The ProcessInfoProvider is a bean which just delivers these and does internally the required wrapping or unwrapping. In addition this creates a migration path as new stuff can be written which depends just on the servlet api and the bridge to the old stuff is this info provider. I totally agree that we should remove our own environment as soon as possible, but this would create a lot of incompatibilities (as outlined in one of those threads). The biggest is that req.getSession() returns a o.a.c.e.Session currently and with switching to the servlet api it becomes a httpsession. Personally I would strongly suggest to leave this stuff as it is and release 2.2 and see what happens.
I'm not sure if I understand you fully. Do you want to say that we should leave our environment interfaces untouched in general but I'm free to mess in AbstractTestCase or do you suggest to leave everything untouched?
Of course, I need something to do in order to be able to test Object Model implementation and parts using it. -- Grzegorz Kossakowski http://reflectingonthevicissitudes.wordpress.com/