small fixes

This commit is contained in:
cagache
2019-11-20 11:24:21 +02:00
parent 1b0b871fa3
commit 4fd762ff43
2 changed files with 7 additions and 8 deletions

View File

@@ -138,8 +138,7 @@ public class AuditAddToHoldTests extends BaseRMRestTest
recordFolderToBeAdded.getName())); recordFolderToBeAdded.getName()));
String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(), String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
recordFolder.getName(), recordToBeAdded.getName())); recordFolder.getName(), recordToBeAdded.getName()));
String contentPath = contentToBeAdded.getCmisLocation(); String contentPath = "/Company Home" + contentToBeAdded.getCmisLocation();
contentPath = contentPath.substring(contentPath.indexOf(documentLibrary));
return new String[][] 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()); 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.", assertTrue("The hold name value for the first add to hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( 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.", assertTrue("The hold name value for the second add to hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( 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"))));
} }
/** /**

View File

@@ -149,8 +149,8 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest
heldRecordFolder.getName())); heldRecordFolder.getName()));
String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(), String recordPath = removeLastSlash(buildPath(documentLibrary, recordCategory.getName(),
recordFolder.getName(), heldRecord.getName())); recordFolder.getName(), heldRecord.getName()));
String contentPath = heldContent.getCmisLocation(); String contentPath = "/Company Home" + heldContent.getCmisLocation();
contentPath = contentPath.substring(contentPath.indexOf(documentLibrary));
return new String[][] return new String[][]
{ {
// a record folder // a record folder
@@ -295,10 +295,10 @@ public class AuditRemoveFromHoldTests extends BaseRMRestTest
auditEntries.size()); auditEntries.size());
assertTrue("The hold name value for the first remove from hold is not audited.", assertTrue("The hold name value for the first remove from hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( 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.", assertTrue("The hold name value for the second remove from hold is not audited.",
auditEntries.stream().anyMatch(entry -> entry.getChangedValues().contains( 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"))));
} }
/** /**