Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Reinhard Poetz
Ugo Cei wrote: Il giorno 22/ott/04, alle 19:40, Reinhard Poetz ha scritto: Have you considered using Easymock? IMHO its usage is more intuitive than jMock. (see BlockDeployer test cases) After perusing the documentation and samples, I decided that I liked jMock more, but I didn't try EasyMock

RE: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Carsten Ziegeler
Ugo Cei wrote: In the coming days, I plan to rewrite all tests depending on ExcaliburTestCase so that we can forget about it. Stay tuned. In addition, our tests test if it is possible to get a corresponding selector (e.g. for transformers etc.) and then the component to test from this

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Ugo Cei
Il giorno 25/ott/04, alle 08:58, Carsten Ziegeler ha scritto: Ugo Cei wrote: In the coming days, I plan to rewrite all tests depending on ExcaliburTestCase so that we can forget about it. Stay tuned. In addition, our tests test if it is possible to get a corresponding selector (e.g. for

RE: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Carsten Ziegeler
Ugo Cei wrote: Il giorno 25/ott/04, alle 08:58, Carsten Ziegeler ha scritto: Ugo Cei wrote: In the coming days, I plan to rewrite all tests depending on ExcaliburTestCase so that we can forget about it. Stay tuned. In addition, our tests test if it is possible to get a

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Ugo Cei
Il giorno 25/ott/04, alle 08:17, Reinhard Poetz ha scritto: Probably yes. IMO the advantages of Easymock are - you directly call methods on the objects - so refactoring is rather simple because the TestMethods are updated too Interesting. This merits some more consideration. I also don't

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Reinhard Poetz
Ugo Cei wrote: Il giorno 25/ott/04, alle 08:17, Reinhard Poetz ha scritto: Probably yes. IMO the advantages of Easymock are - you directly call methods on the objects - so refactoring is rather simple because the TestMethods are updated too Interesting. This merits some more consideration.

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Ugo Cei
Il giorno 25/ott/04, alle 09:39, Reinhard Poetz ha scritto: But sometimes there are cases when you have to mock an object and not an interface and Easymock can build proxy objects of them too. Not true. You can mock classes with jMock too: http://jmock.org/cglib.html :-) Ugo -- Ugo Cei

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Reinhard Poetz
Ugo Cei wrote: Il giorno 25/ott/04, alle 09:39, Reinhard Poetz ha scritto: But sometimes there are cases when you have to mock an object and not an interface and Easymock can build proxy objects of them too. Not true. You can mock classes with jMock too: http://jmock.org/cglib.html :-) Ugo

Re: Making tests suck less (was Re: ECM++)

2004-10-25 Thread Giacomo Pati
On Mon, 25 Oct 2004, Ugo Cei wrote: Il giorno 25/ott/04, alle 09:54, Reinhard Poetz ha scritto: Anyway, I don't think we have to decide on one mock framework. Whoever writes the test decides, which one he prefers. Yes, that's a possibility. I am just thinking that it might be less confusing for

Making tests suck less (was Re: ECM++)

2004-10-22 Thread Ugo Cei
I wrote: Currently, all the unit tests involving sitemap components fail because the class org.apache.cocoon.components.ExtendedComponentSelector, which is referenced by *.xtest files, has been removed. Now, those tests depend on the deprecated ExcaliburTestcase class and it would be nice to

Re: Making tests suck less (was Re: ECM++)

2004-10-22 Thread Reinhard Poetz
Ugo Cei wrote: I wrote: Using the jMock library, the test looks like this (slightly edited to simplify): Have you considered using Easymock? IMHO its usage is more intuitive than jMock. -- Reinhard

Re: Making tests suck less (was Re: ECM++)

2004-10-22 Thread Reinhard Poetz
Ugo Cei wrote: I wrote: Using the jMock library, the test looks like this (slightly edited to simplify): Have you considered using Easymock? IMHO its usage is more intuitive than jMock. (see BlockDeployer test cases) -- Reinhard

Re: Making tests suck less (was Re: ECM++)

2004-10-22 Thread Ugo Cei
Il giorno 22/ott/04, alle 19:40, Reinhard Poetz ha scritto: Have you considered using Easymock? IMHO its usage is more intuitive than jMock. (see BlockDeployer test cases) After perusing the documentation and samples, I decided that I liked jMock more, but I didn't try EasyMock in practice. If