JCRUnit

JCRUnit makes it easier to create unit tests for components that are dependent on Java Content Repositories:

  • JCRRepositoryExtension is used launch an embedded Java Content Repository so that the unit tests written using JUnit 5 do not have to be dependent on an external Java Content Repository with unpredictable state.
  • JCRRepositoryRule is used launch an embedded Java Content Repository so that the unit tests written using JUnit 4 do not have to be dependent on an external Java Content Repository with unpredictable state.
  • JCRRepositoryTester is used to connect to a Java Content Repository (embedded or external) and make assertions about or verify the contents of the Java Content Repository.

JCRUnit relies on Jackrabbit Oak to run the embedded Java Content Repository and as the API used to connect to the Java Content Repository.

Maven Coordinates

The LDAPUnit has been published in Maven Central at the following coordinates:

<plugin>
    <groupId>com.buralotech.oss.jcrunit</groupId>
    <artifactId>jcrunit</artifactId>
    <version>3.0.0</version>
</plugin>

Licensing and Source Code

The LDAPUnit is made available under the Apache License and the source code is hosted on GitHub at https://github.com/bmatthews68/jcrunit.