public abstract class AbstractJCRTestCase extends AbstractExoContainerTestCase
| Constructor and Description |
|---|
AbstractJCRTestCase() |
| Modifier and Type | Method and Description |
|---|---|
protected javax.jcr.Node |
addFile(String path)
Add a file at a given path.
|
protected javax.jcr.Node |
addNode(String path)
Add a new node to a given path.
|
protected javax.jcr.Node |
addNode(String path,
String nodetype)
Add a new node to a given path.
|
protected void |
assertBinaryPropertyNotEmpty(javax.jcr.Node node,
String property)
Asserts a property value is not empty
|
protected void |
assertNodeExists(String path)
Asserts a node exists at the given path
|
protected void |
assertNodeNotExists(String path)
Asserts a node does not exists at the given path
|
protected void |
assertPropertyEquals(boolean expected,
javax.jcr.Node node,
String property) |
protected void |
assertPropertyEquals(String expected,
javax.jcr.Node node,
String property) |
protected void |
assertPropertyExists(javax.jcr.Node node,
String property)
Asserts a node has a property
|
void |
beforeContainerStart() |
protected void |
deleteNode(String path)
removes a node at a given path
|
protected javax.jcr.Node |
getNode(String path)
Load a node from path
|
protected String |
getRepository()
Get the repository for the current test
|
protected javax.jcr.Session |
getSession()
Get a session on the test workspace
|
protected String |
getWorkspace()
Get the workspace available for test data
|
void |
initTempDir() |
void |
setUp() |
afterContainerStart, getComponent, registerComponent, replaceComponent, startContainerpublic void setUp()
public void beforeContainerStart()
beforeContainerStart in class AbstractExoContainerTestCasepublic void initTempDir()
protected String getWorkspace() throws javax.jcr.RepositoryException, org.exoplatform.services.jcr.config.RepositoryConfigurationException
org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionjavax.jcr.RepositoryExceptionprotected String getRepository() throws javax.jcr.RepositoryException, org.exoplatform.services.jcr.config.RepositoryConfigurationException
org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionjavax.jcr.RepositoryExceptionprotected void assertNodeExists(String path)
path - path relative to root of test workspaceprotected void assertNodeNotExists(String path)
path - relative path to root of test workspaceprotected javax.jcr.Node getNode(String path)
path - protected javax.jcr.Session getSession()
throws javax.jcr.RepositoryException,
org.exoplatform.services.jcr.config.RepositoryConfigurationException
org.exoplatform.services.jcr.config.RepositoryConfigurationExceptionExceptionjavax.jcr.RepositoryExceptionprotected javax.jcr.Node addNode(String path)
path - relative path to rootprotected javax.jcr.Node addNode(String path, String nodetype)
path - relative path to rootnodetype - nodetype for the last node to createprotected javax.jcr.Node addFile(String path)
path - relative path to rootprotected void deleteNode(String path)
path - relative path from rootprotected void assertPropertyExists(javax.jcr.Node node,
String property)
node - note to assertproperty - propertyNameprotected void assertBinaryPropertyNotEmpty(javax.jcr.Node node,
String property)
node - property - protected void assertPropertyEquals(String expected, javax.jcr.Node node, String property)
protected void assertPropertyEquals(boolean expected,
javax.jcr.Node node,
String property)
Copyright © 2003–2015 eXo Platform SAS. All rights reserved.