You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by Nicolas <nt...@gmail.com> on 2007/02/18 04:49:13 UTC

Where are the Persistence Manager Unit Test?

Hi,

As you might know, I am adding a visitor pattern to the PersistenceManager.
My code update is over however I would like to add a unit test to validate
the modification, but I can't find the relevant ones to the
PersistenceManager class.

Can you please tell them where should I write those unit tests and where is
the persistence manager test infrastructure?

Thanks
Nico
my blog! http://www.deviant-abstraction.net !!

Re: Where are the Persistence Manager Unit Test?

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/18/07, Nicolas <nt...@gmail.com> wrote:
> As you might know, I am adding a visitor pattern to the PersistenceManager.
> My code update is over however I would like to add a unit test to validate
> the modification, but I can't find the relevant ones to the
> PersistenceManager class.

I don't think we have existing unit tests covering the specific
persistence managers. Persistence is only tested indirectly through
the JCR API test suite.

> Can you please tell them where should I write those unit tests and where is
> the persistence manager test infrastructure?

The convention is to have the test cases of an
org.apache.jackrabbit.somepackage.SomeClass class within src/main/java
as the JUnit TestCase class
org.apache.jackrabbit.somepackage.SomeClassTest within src/test/java.
If the test case leverages the JCR API test suite, then it should
subclass org.apache.jackrabbit.test.AbstractJCRTest instead of the
JUnit TestCase.

BR,

Jukka Zitting