RM-4339 Fix tests.

Also remove catch blocks, since we've upgraded TAS.
This commit is contained in:
Tom Page
2017-03-10 12:44:20 +00:00
parent 4d71d6d2b5
commit 27fc457dec

View File

@@ -82,48 +82,21 @@ public class RMRestWrapper
/** Process responses for a collection of models as {@link RestSiteModelsCollection}. */
public <T> T processModels(Class<T> classz, RestRequest simpleRequest)
{
try
{
return restWrapper.processModels(classz, simpleRequest);
}
catch (Exception e)
{
// TODO Hopefully remove this check when TAS stops using checked exceptions.
// See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392
throw new RuntimeException(e);
}
}
/** Process responses for a single model as {@link RestSiteModel}. */
public <T> T processModel(Class<T> classz, RestRequest restRequest)
{
try
{
return restWrapper.processModel(classz, restRequest);
}
catch (Exception e)
{
// TODO Hopefully remove this check when TAS stops using checked exceptions.
// See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392
throw new RuntimeException(e);
}
}
/** Process a response that has no body - basically will need only the status code from it. */
public void processEmptyModel(RestRequest simpleRequest)
{
try
{
restWrapper.processEmptyModel(simpleRequest);
}
catch (EmptyJsonResponseException e)
{
// TODO Hopefully remove this check when TAS stops using checked exceptions.
// See https://gitlab.alfresco.com/tas/alfresco-tas-restapi-test/merge_requests/392
throw new RuntimeException(e);
}
}
/** Get the most recently returned status code. */
public String getStatusCode()