public abstract class TestHelpers extends Object
Abstract TestHelpers class.
| Modifier and Type | Field and Description |
|---|---|
static String |
MOCK_PREFIX |
static String |
MOCK_URI_STRING |
| Constructor and Description |
|---|
TestHelpers() |
| Modifier and Type | Method and Description |
|---|---|
static javax.jcr.query.Query |
getQueryMock() |
static javax.jcr.Session |
getQuerySessionMock() |
static javax.jcr.Session |
getSessionMock() |
static javax.ws.rs.core.UriInfo |
getUriInfoImpl() |
static org.fcrepo.kernel.api.models.FedoraBinary |
mockBinary(String pid,
String dsId,
String content) |
static org.fcrepo.kernel.api.models.NonRdfSourceDescription |
mockDatastream(String pid,
String dsId,
String content) |
static org.modeshape.jcr.api.Repository |
mockRepository() |
static javax.jcr.Session |
mockSession(org.fcrepo.http.commons.AbstractResource testObj) |
static Collection<String> |
parseChildren(org.apache.http.HttpEntity entity) |
static CloseableGraphStore |
parseTriples(org.apache.http.HttpEntity entity) |
static CloseableGraphStore |
parseTriples(InputStream content) |
static CloseableGraphStore |
parseTriples(InputStream content,
String contentType) |
static void |
setField(Object parent,
String name,
Object obj)
Set a field via reflection
|
public static String MOCK_PREFIX
public static String MOCK_URI_STRING
public TestHelpers()
public static javax.ws.rs.core.UriInfo getUriInfoImpl()
public static javax.jcr.Session getQuerySessionMock()
public static javax.jcr.query.Query getQueryMock()
public static javax.jcr.Session getSessionMock() throws javax.jcr.RepositoryException
javax.jcr.RepositoryExceptionpublic static Collection<String> parseChildren(org.apache.http.HttpEntity entity) throws IOException
IOExceptionpublic static javax.jcr.Session mockSession(org.fcrepo.http.commons.AbstractResource testObj)
public static org.modeshape.jcr.api.Repository mockRepository() throws javax.jcr.LoginException, javax.jcr.RepositoryException
javax.jcr.LoginExceptionjavax.jcr.RepositoryExceptionpublic static org.fcrepo.kernel.api.models.NonRdfSourceDescription mockDatastream(String pid, String dsId, String content)
public static org.fcrepo.kernel.api.models.FedoraBinary mockBinary(String pid, String dsId, String content)
public static CloseableGraphStore parseTriples(org.apache.http.HttpEntity entity) throws IOException
IOExceptionpublic static CloseableGraphStore parseTriples(InputStream content)
public static CloseableGraphStore parseTriples(InputStream content, String contentType)
Copyright © 2013-2015 DuraSpace, Inc.. All Rights Reserved.