mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
RM-4159 Add wrapper method for assertLastError.
This commit is contained in:
@@ -29,6 +29,7 @@ package org.alfresco.rest.core;
|
|||||||
import com.jayway.restassured.builder.RequestSpecBuilder;
|
import com.jayway.restassured.builder.RequestSpecBuilder;
|
||||||
|
|
||||||
import org.alfresco.rest.exception.EmptyJsonResponseException;
|
import org.alfresco.rest.exception.EmptyJsonResponseException;
|
||||||
|
import org.alfresco.rest.model.RestErrorModel;
|
||||||
import org.alfresco.rest.model.RestHtmlResponse;
|
import org.alfresco.rest.model.RestHtmlResponse;
|
||||||
import org.alfresco.rest.model.RestSiteModel;
|
import org.alfresco.rest.model.RestSiteModel;
|
||||||
import org.alfresco.rest.model.RestSiteModelsCollection;
|
import org.alfresco.rest.model.RestSiteModelsCollection;
|
||||||
@@ -73,6 +74,12 @@ public class RMRestWrapper
|
|||||||
restWrapper.authenticateUser(userModel);
|
restWrapper.authenticateUser(userModel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Get the last error thrown (if any). */
|
||||||
|
public RestErrorModel assertLastError()
|
||||||
|
{
|
||||||
|
return restWrapper.assertLastError();
|
||||||
|
}
|
||||||
|
|
||||||
/** Process responses for a collection of models as {@link RestSiteModelsCollection}. */
|
/** Process responses for a collection of models as {@link RestSiteModelsCollection}. */
|
||||||
public <T> T processModels(Class<T> classz, RestRequest simpleRequest)
|
public <T> T processModels(Class<T> classz, RestRequest simpleRequest)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user