You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Costin Leau <co...@gmail.com> on 2005/10/04 10:14:29 UTC

Re[2]: mock jcr implementation

> EasyMock is very nice for many cases, but it doesn't IMO very well match the
> needs of JCR unit testing. Even a simple JCR client component ends easily up
> using quite a few of the JCR interfaces (e.g. Session -> Node ->
PropertyIterator ->> Property)  in one method, which makes the EasyMock fixture
> rather complex.
I agree - I simplified the method configuring mocks for Repository,
Session, Node, Property and Iterators inside setUp / tearDown methods.
It's not perfect but it does work as an intermediary solution.

> repository stuff is still based on the file system, making the test
> environment
> more complex to manage.
Exactly :). Plus instead of recreating the repository for each test, I
prefer creating the mocks.

-- 
Best regards,
 Costin                            mailto:costin.leau@gmail.com