jackrabbit-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jukka Zitting <ju...@zitting.name>
Subject Re: mock jcr implementation
Date Tue, 04 Oct 2005 08:10:56 GMT
Hi,

Costin Leau wrote:
>> has anybody written a mock implementation of jcr for unit testing?
> You can use easymock (as a replacement or substitute until you find
> the mock 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've been thinking about a simple in-memory JCR implementation that could be
used as a kind of a mock for testing JCR applications. As I've so far not had
much time to work on this idea, I've been using Jackrabbit with the
InMemPersistenceManager as an alternative solution. The problem with this
solution is that even though the node data is kept in memory, much of the
repository stuff is still based on the file system, making the test 
environment
more complex to manage.

BR,

Jukka Zitting

Mime
View raw message