diff --git a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RestAPIFactory.java b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RestAPIFactory.java index cec4bf63f1..41370c7a55 100644 --- a/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RestAPIFactory.java +++ b/rm-automation/rm-automation-community-rest-api/src/main/java/org/alfresco/rest/core/RestAPIFactory.java @@ -67,6 +67,11 @@ public class RestAPIFactory return this.rmRestWrapper; } + public void setRmRestWrapper(RMRestWrapper rmRestWrapper) + { + this.rmRestWrapper = rmRestWrapper; + } + private RestIGCoreAPI getRestIGCoreAPI(UserModel userModel) { getRmRestWrapper().authenticateUser(userModel != null ? userModel : dataUser.getAdminUser()); diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java index ebef9ce32c..cb25fcd074 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/base/BaseRMRestTest.java @@ -100,7 +100,7 @@ public class BaseRMRestTest extends RestTest */ protected void assertStatusCode(HttpStatus statusCode) { - getRestAPIFactory().getRmRestWrapper().assertStatusCodeIs(statusCode); + restAPIFactory.getRmRestWrapper().assertStatusCodeIs(statusCode); } /** @@ -145,7 +145,7 @@ public class BaseRMRestTest extends RestTest */ public void createRMSiteIfNotExists() throws Exception { - RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI(); + RMSiteAPI rmSiteAPI = restAPIFactory.getRMSiteAPI(); // Check RM site doesn't exist if (!rmSiteAPI.existsRMSite()) @@ -294,16 +294,16 @@ public class BaseRMRestTest extends RestTest assertTrue(aspects.contains(RECORD_TYPE)); // a record mustn't be closed assertFalse(aspects.contains(ASPECTS_CLOSED_RECORD)); - + // add closed record aspect aspects.add(ASPECTS_CLOSED_RECORD); - - FilePlanComponent updatedComponent = filePlanComponentsAPI.updateFilePlanComponent(FilePlanComponent.builder().aspectNames(aspects).build(), + + FilePlanComponent updatedComponent = filePlanComponentsAPI.updateFilePlanComponent(FilePlanComponent.builder().aspectNames(aspects).build(), recordToClose.getId()); assertStatusCode(OK); return updatedComponent; } - + /** * Helper method to create a randomly-named / structure in file plan *