cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leszek Gawron <lgaw...@mobilebox.pl>
Subject Re: svn commit: r582862 - /cocoon/trunk/blocks/cocoon-template/cocoon-template-impl/src/test/resources/org/apache/cocoon/template/jxtg/JXTemplateGeneratorTestCase.spring.xml
Date Mon, 08 Oct 2007 21:37:19 GMT
Grzegorz Kossakowski wrote:
> lgawron@apache.org pisze:
>> Author: lgawron
>> Date: Mon Oct  8 09:17:27 2007
>> New Revision: 582862
>>
>> URL: http://svn.apache.org/viewvc?rev=582862&view=rev
>> Log:
>> use springified version of cocoon store
> 
> Do you think we you need real implementation of store for testing?
> 
> What about using mock objects?


The store itself is not that heavy to mock it. Anyway the purpose of 
mocking IMO is:

- provide parts of the environment you do not have (http request, 
response, servlet context)
- test interaction between the tested component and it's dependencies 
(like testing if the cocoon template actually registers proper store 
entries).

It is way less important in this case to reduce dependencies as they are 
already in place. It's way easier to use store as it is than to create 
and debug a mock that provides a proper functionality.


-- 
Leszek Gawron                         http://www.mobilebox.pl/krs.html
CTO at MobileBox Ltd.


Mime
View raw message