cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bruno Dumon <br...@outerthought.org>
Subject Re: [Woody] Purpose of DynamicSelectionList.SelectionListHandler
Date Fri, 17 Oct 2003 18:54:39 GMT
On Thu, 2003-10-16 at 00:11, Ugo Cei wrote:
> Bruno Dumon wrote:
> > On Wed, 2003-10-15 at 22:29, Ugo Cei wrote:
> >>To all Woddy gurus out there: what is the purpose of the 
> >>DynamicSelectionList.SelectionListHandler class? Why doesn't 
> >>DynamicSelectionList just spit out the SAX events generated from its 
> >>source. What conversions do take place there?
> > conversion from how things were formatted where the list data was
> > retrieved from to how it should be formatted so that the widget will
> > recognize it upon form submit.
> 
> Yeah, somehow I figured it out by myself after I wrote my mail. However, 
> this means that, in order to test this conversion I need to pass an 
> instance of a subclass of Datatype to the DynamicSelectionList 
> constructor, and the only way to get one is via the DatatypeManager and 
> in turn that requires having an Avalon ServiceManager. Is that correct?
> 
> Unfortunately, for unit testing, we only have an 
> AbstractCompositeTestCase which extends ExcaliburTestCase, which 
> implements Composable and not Serviceable, right?

euh... wrong I think. The ExcaliburTestCase creates an ECM, and the ECM
supports both Composable and Serviceable. Or what problem do you see?

> 
> So, what do we do? Do we implement a ServiceableTestCase or do we forget 
> about unit testing Woody components? And what about other components 
> after the migration from ECM to Fortress is completed in Cocoon 2.2?
> 
> I'm feeling somewhat lost here. I didn't figure unit-testing Cocoon was 
> so hard :-(.

Maybe it would be easier if you ran the tests from inside a running
Cocoon (possibly using the CocoonBean), so that the whole environment is
created. But maybe that goes against the spirit of unit tests?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org                          bruno@apache.org


Mime
View raw message