cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Upayavira ...@upaya.co.uk>
Subject Re: [RT] Unit testing and CocoonUnit
Date Sun, 02 Nov 2003 12:52:56 GMT
Jeremy Quinn wrote:

>
> On Saturday, November 1, 2003, at 05:21 PM, Upayavira wrote:
>
> <snip wot="really interesting stuff">
>
>>       String generatorXML = response.getPipelineXML(0);
>>       String transformedXML = response.getPipelineXML(1);
>>
>
> If I understand this correctly .... you are referring to elements on 
> the pipeline via an index.
>
> Are you sure that is such a great idea?
>
> If you re-implement a pipeline, you would have to re-write your tests 
> .... which seems to be contrary to the whole point of pipeline testing 
> .....

The point here is 'unit' testing, i.e. testing just one bit. Therefore, 
if you do too much reworking of your pipeline, you've probably changed 
your 'units' and thus would need new tests.

Also, whether indexes are wise or not, they would be tremendously easy 
to implement.

> Would it not be better to refer to parts of a pipeline by their 
> view-label?

I did mull on that one. Firstly, not all pipeline stages necessarily 
have labels - so you would have to add labels for each pipeline stage, 
which would require a change to your sitemap, and I'm keen to avoid 
that. Also, I don't know how I would get at the view label from within 
the AbstractProcessingPipeline. I suspect that the point I want to make 
my change (so as to minimise the impact upon an important bit of Cocoon) 
no longer has access to the view information - all that is left is a 
generator, some transformers and a serializer.

However, I do think that offering both indexes and view labels would be 
good, if I were able to work out how to identify the label.

Regards, Upayavira



Mime
View raw message