Class RepositoryTestBase
- java.lang.Object
-
- junit.framework.Assert
-
- junit.framework.TestCase
-
- org.apache.sling.commons.testing.jcr.RepositoryTestBase
-
- All Implemented Interfaces:
junit.framework.Test
public class RepositoryTestBase extends junit.framework.TestCaseBase class for JUnit3-style tests which need a Repository. Should eventually be deprecated in favor ofRepositoryProviderwhich is less intrusive
-
-
Constructor Summary
Constructors Constructor Description RepositoryTestBase()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.apache.sling.jcr.api.SlingRepositorygetRepository()Return a Repositoryprotected javax.jcr.SessiongetSession()Return a JCR Session, initialized on demandprotected javax.jcr.NodegetTestRootNode()Return a test root node, created on demand, with a unique pathprotected voidtearDown()-
Methods inherited from class junit.framework.TestCase
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, countTestCases, createResult, fail, fail, failNotEquals, failNotSame, failSame, format, getName, run, run, runBare, runTest, setName, setUp, toString
-
-
-
-
Method Detail
-
tearDown
protected void tearDown() throws Exception- Overrides:
tearDownin classjunit.framework.TestCase- Throws:
Exception
-
getSession
protected javax.jcr.Session getSession() throws javax.jcr.RepositoryException, NamingExceptionReturn a JCR Session, initialized on demand- Throws:
javax.jcr.RepositoryExceptionNamingException
-
getTestRootNode
protected javax.jcr.Node getTestRootNode() throws javax.jcr.RepositoryException, NamingExceptionReturn a test root node, created on demand, with a unique path- Throws:
javax.jcr.RepositoryExceptionNamingException
-
getRepository
protected org.apache.sling.jcr.api.SlingRepository getRepository() throws javax.jcr.RepositoryException, NamingExceptionReturn a Repository- Throws:
javax.jcr.RepositoryExceptionNamingException
-
-