mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merge branch 'feature/RM-4339_RestTestsGuideTopicApi' into 'master'
Feature/rm 4339 rest tests guide topic api See merge request !135
This commit is contained in:
@@ -83,46 +83,19 @@ public class RMRestWrapper
|
|||||||
/** 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)
|
||||||
{
|
{
|
||||||
try
|
return restWrapper.processModels(classz, simpleRequest);
|
||||||
{
|
|
||||||
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}. */
|
/** Process responses for a single model as {@link RestSiteModel}. */
|
||||||
public <T> T processModel(Class<T> classz, RestRequest restRequest)
|
public <T> T processModel(Class<T> classz, RestRequest restRequest)
|
||||||
{
|
{
|
||||||
try
|
return restWrapper.processModel(classz, restRequest);
|
||||||
{
|
|
||||||
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. */
|
/** Process a response that has no body - basically will need only the status code from it. */
|
||||||
public void processEmptyModel(RestRequest simpleRequest)
|
public void processEmptyModel(RestRequest simpleRequest)
|
||||||
{
|
{
|
||||||
try
|
restWrapper.processEmptyModel(simpleRequest);
|
||||||
{
|
|
||||||
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. */
|
/** Get the most recently returned status code. */
|
||||||
|
Reference in New Issue
Block a user