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 963853cb37..05d4add82e 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 @@ -65,6 +65,7 @@ import org.alfresco.rest.rm.community.model.recordcategory.RecordCategory; import org.alfresco.rest.rm.community.model.recordcategory.RecordCategoryChild; import org.alfresco.rest.rm.community.model.recordfolder.RecordFolder; import org.alfresco.rest.rm.community.model.recordfolder.RecordFolderProperties; +import org.alfresco.rest.rm.community.model.site.RMSite; import org.alfresco.rest.rm.community.model.transfercontainer.TransferContainer; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainer; import org.alfresco.rest.rm.community.model.unfiledcontainer.UnfiledContainerChild; @@ -178,6 +179,21 @@ public class BaseRMRestTest extends RestTest } } + /** + * Helper method to delete the RM site if exists and to create a new one + */ + public void createRMSite(RMSite rmSiteModel) throws Exception + { + RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI(); + if (rmSiteAPI.existsRMSite()) + { + rmSiteAPI.deleteRMSite(); + } + + rmSiteAPI.createRMSite(rmSiteModel); + assertStatusCode(CREATED); + } + /** * Helper method to create root category as the admin user * diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/CompleteRecordTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/CompleteRecordTests.java index f972644745..985ffe00bc 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/CompleteRecordTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/records/CompleteRecordTests.java @@ -221,17 +221,6 @@ public class CompleteRecordTests extends BaseRMRestTest } } - /** - * Helper method to create an RM site and assert successful creation - */ - private void createRMSite(RMSite rmSiteModel) throws Exception - { - RMSiteAPI rmSiteAPI = getRestAPIFactory().getRMSiteAPI(); - rmSiteAPI.deleteRMSite(); - rmSiteAPI.createRMSite(rmSiteModel); - assertStatusCode(CREATED); - } - /** * Helper method to create records and and assert successful creation */