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.
|
public static MockHelper create(org.apache.sling.api.resource.ResourceResolver resolver)
resolver - Resource resolverpublic MockHelper resource(String path)
path - Resource pathpublic MockHelper p(String name, Object value)
name - Property namevalue - Property valuepublic void add()
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException - Persistence exceptionpublic void commit()
throws org.apache.sling.api.resource.PersistenceException
org.apache.sling.api.resource.PersistenceException - Persistence exceptionCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.