public class MockHelper extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
add()
Finish building and add all resources to the resource tree.
|
void |
commit()
Finish building, add all resources to the resource tree and commit
changes.
|
static MockHelper |
create(org.apache.sling.api.resource.ResourceResolver resolver)
Create a new helper
|
MockHelper |
p(String name,
Object value)
Add a property to the current resource
|
MockHelper |
resource(String path)
Add a new resource
If the path is relative, this resource is added as a child to the previous resource.
|
public static MockHelper create(org.apache.sling.api.resource.ResourceResolver resolver)
public MockHelper resource(String path)
public MockHelper p(String name, Object value)
public void add()
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionpublic void commit()
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceExceptionCopyright © 2007–2014 The Apache Software Foundation. All rights reserved.