| Modifier and Type | Class and Description | 
|---|---|
protected static class  | 
BaseTest.RequestType  | 
| Modifier and Type | Field and Description | 
|---|---|
protected com.sun.jersey.api.client.Client | 
client  | 
protected com.fasterxml.jackson.databind.ObjectMapper | 
mapper  | 
protected com.sun.jersey.api.client.WebResource | 
service  | 
protected ServletContainerFeature | 
servletContainerFeature  | 
CoreSession | 
session  | 
| Constructor and Description | 
|---|
BaseTest()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected void | 
assertEntityEqualsDoc(InputStream in,
                     DocumentModel doc)  | 
protected void | 
assertNodeEqualsDoc(com.fasterxml.jackson.databind.JsonNode node,
                   DocumentModel note)  | 
void | 
doAfter()  | 
void | 
doBefore()  | 
protected void | 
fetchInvalidations()
Fetch session invalidations. 
 | 
protected String | 
getBaseURL()  | 
protected String | 
getErrorMessage(com.fasterxml.jackson.databind.JsonNode node)  | 
protected List<com.fasterxml.jackson.databind.JsonNode> | 
getLogEntries(com.fasterxml.jackson.databind.JsonNode node)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           Map<String,String> headers)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           com.sun.jersey.multipart.MultiPart mp)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           com.sun.jersey.multipart.MultiPart mp,
           Map<String,String> headers)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           javax.ws.rs.core.MultivaluedMap<String,String> queryParams)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           String data)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           String data,
           Map<String,String> headers)  | 
protected CloseableClientResponse | 
getResponse(BaseTest.RequestType requestType,
           String path,
           String data,
           javax.ws.rs.core.MultivaluedMap<String,String> queryParams,
           com.sun.jersey.multipart.MultiPart mp,
           Map<String,String> headers)  | 
protected com.fasterxml.jackson.databind.JsonNode | 
getResponseAsJson(BaseTest.RequestType responseType,
                 String url)  | 
protected com.fasterxml.jackson.databind.JsonNode | 
getResponseAsJson(BaseTest.RequestType responseType,
                 String url,
                 javax.ws.rs.core.MultivaluedMap<String,String> queryParams)  | 
protected String | 
getRestApiUrl()  | 
protected com.sun.jersey.api.client.WebResource | 
getServiceFor(String username,
             String password)
Returns a  
WebResource to perform REST API calls with the given credentials. | 
protected com.sun.jersey.api.client.WebResource | 
getServiceFor(String resource,
             String username,
             String password)
Returns a  
WebResource to perform calls on the given resource with the given credentials. | 
protected void | 
setJSONContentTypeIfAbsent(com.sun.jersey.api.client.WebResource.Builder builder,
                          Map<String,String> headers)  | 
@Inject protected ServletContainerFeature servletContainerFeature
protected com.fasterxml.jackson.databind.ObjectMapper mapper
protected com.sun.jersey.api.client.Client client
protected com.sun.jersey.api.client.WebResource service
@Inject public CoreSession session
public BaseTest()
protected String getBaseURL()
protected String getRestApiUrl()
protected com.sun.jersey.api.client.WebResource getServiceFor(String username, String password)
WebResource to perform REST API calls with the given credentials.
 Since 9.3, uses the Apache HTTP client, more reliable and much more configurable than the one from the JDK.
protected com.sun.jersey.api.client.WebResource getServiceFor(String resource, String username, String password)
WebResource to perform calls on the given resource with the given credentials.
 Uses the Apache HTTP client, more reliable and much more configurable than the one from the JDK.
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, Map<String,String> headers)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, com.sun.jersey.multipart.MultiPart mp)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, com.sun.jersey.multipart.MultiPart mp, Map<String,String> headers)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, javax.ws.rs.core.MultivaluedMap<String,String> queryParams)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, String data)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, String data, Map<String,String> headers)
protected CloseableClientResponse getResponse(BaseTest.RequestType requestType, String path, String data, javax.ws.rs.core.MultivaluedMap<String,String> queryParams, com.sun.jersey.multipart.MultiPart mp, Map<String,String> headers)
protected void setJSONContentTypeIfAbsent(com.sun.jersey.api.client.WebResource.Builder builder, Map<String,String> headers)
protected com.fasterxml.jackson.databind.JsonNode getResponseAsJson(BaseTest.RequestType responseType, String url) throws IOException, com.fasterxml.jackson.core.JsonProcessingException
IOExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionprotected com.fasterxml.jackson.databind.JsonNode getResponseAsJson(BaseTest.RequestType responseType, String url, javax.ws.rs.core.MultivaluedMap<String,String> queryParams) throws com.fasterxml.jackson.core.JsonProcessingException, IOException
get - string - queryParamsForPage - IOExceptioncom.fasterxml.jackson.core.JsonProcessingExceptionprotected void fetchInvalidations()
protected void assertNodeEqualsDoc(com.fasterxml.jackson.databind.JsonNode node, DocumentModel note) throws Exception
Exceptionprotected List<com.fasterxml.jackson.databind.JsonNode> getLogEntries(com.fasterxml.jackson.databind.JsonNode node)
protected String getErrorMessage(com.fasterxml.jackson.databind.JsonNode node)
protected void assertEntityEqualsDoc(InputStream in, DocumentModel doc) throws Exception
ExceptionCopyright © 2019 Nuxeo. All rights reserved.