RM-4159 Add wrapper method for assertLastError.

This commit is contained in:
Tom Page
2017-03-08 08:12:30 +00:00
parent 630f004057
commit 5de74bc2d7

View File

@@ -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)
{ {