From 47e669e4e82fd5d342b76c02c216f2c2e8a60cf6 Mon Sep 17 00:00:00 2001 From: cagache Date: Wed, 20 Nov 2019 11:24:21 +0200 Subject: [PATCH] small fixes --- .../rest/rm/community/audit/AuditAddToHoldTests.java | 7 +++---- .../rest/rm/community/audit/AuditRemoveFromHoldTests.java | 8 ++++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java index a364524533..0d63ac5002 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditAddToHoldTests.java @@ -138,8 +138,7 @@ public class AuditAddToHoldTests extends BaseRMRestTest recordFolderToBeAdded.getName())); String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(), recordFolder.getName(), recordToBeAdded.getName())); - String contentPath = contentToBeAdded.getCmisLocation(); - contentPath = contentPath.substring(contentPath.indexOf(documentLibrary)); + String contentPath = "/Company Home" + contentToBeAdded.getCmisLocation(); return new String[][] { @@ -262,10 +261,10 @@ public class AuditAddToHoldTests extends BaseRMRestTest assertEquals("The list of events should contain Add to Hold entries for both holds", 2, auditEntries.size()); assertTrue("The hold name value for the first add to hold is not audited.", auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( - Collections.singletonList(ImmutableMap.of("new", HOLD1, "previous", "", "name", "Hold Name"))))); + ImmutableMap.of("new", HOLD1, "previous", "", "name", "Hold Name")))); assertTrue("The hold name value for the second add to hold is not audited.", auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( - Collections.singletonList(ImmutableMap.of("new", HOLD2, "previous", "", "name", "Hold Name"))))); + ImmutableMap.of("new", HOLD2, "previous", "", "name", "Hold Name")))); } /** diff --git a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java index 25e03c2630..1ae1a331f7 100644 --- a/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java +++ b/rm-automation/rm-automation-community-rest-api/src/test/java/org/alfresco/rest/rm/community/audit/AuditRemoveFromHoldTests.java @@ -149,8 +149,8 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest heldRecordFolder.getName())); String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(), recordFolder.getName(), heldRecord.getName())); - String contentPath = heldContent.getCmisLocation(); - contentPath = contentPath.substring(contentPath.indexOf(documentLibrary)); + String contentPath = "/Company Home" + heldContent.getCmisLocation(); + return new String[][] { // a record folder @@ -295,10 +295,10 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest auditEntries.size()); assertTrue("The hold name value for the first remove from hold is not audited.", auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( - Collections.singletonList(ImmutableMap.of("new", "", "previous", HOLD1, "name", "Hold Name"))))); + ImmutableMap.of("new", "", "previous", HOLD1, "name", "Hold Name")))); assertTrue("The hold name value for the second remove from hold is not audited.", auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( - Collections.singletonList(ImmutableMap.of("new", "", "previous", HOLD2, "name", "Hold Name"))))); + ImmutableMap.of("new", "", "previous", HOLD2, "name", "Hold Name")))); } /**