From b1dc644ebd84f86d1ac1b19f93d3988ddb91249a Mon Sep 17 00:00:00 2001 From: Tom Page Date: Wed, 14 Oct 2015 15:47:31 +0000 Subject: [PATCH] RM-2604 Fix incorrectly named resources. Also remove duplication of ids in test where this isn't relevant. Thanks Oana for spotting this. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/modules/recordsmanagement/DEV/caveatmarkdatatype@114361 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../caveat/dao/CaveatDAOFromJSONUnitTest.java | 2 +- .../caveat/rm-caveats-duplicateGroupId.json | 18 ++++++++---- .../alfresco/caveat/rm-caveats-missingId.json | 28 ------------------- .../caveat/rm-caveats-missingMarkId.json | 22 +++++++++++++++ 4 files changed, 35 insertions(+), 35 deletions(-) delete mode 100644 rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingId.json create mode 100644 rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingMarkId.json diff --git a/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/caveat/dao/CaveatDAOFromJSONUnitTest.java b/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/caveat/dao/CaveatDAOFromJSONUnitTest.java index f6f6e70fc4..150c556df1 100644 --- a/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/caveat/dao/CaveatDAOFromJSONUnitTest.java +++ b/rm-server/unit-test/java/org/alfresco/module/org_alfresco_module_rm/caveat/dao/CaveatDAOFromJSONUnitTest.java @@ -69,7 +69,7 @@ public class CaveatDAOFromJSONUnitTest @Test(expected = MalformedConfiguration.class) public void testGetCaveatGroups_missingId() { - caveatDAOFromJSON.setConfigLocation("/alfresco/caveat/rm-caveats-missingId.json"); + caveatDAOFromJSON.setConfigLocation("/alfresco/caveat/rm-caveats-missingMarkId.json"); caveatDAOFromJSON.getCaveatGroups(); } diff --git a/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-duplicateGroupId.json b/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-duplicateGroupId.json index 01a5d8f985..ebe080ef9c 100644 --- a/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-duplicateGroupId.json +++ b/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-duplicateGroupId.json @@ -9,13 +9,19 @@ { "id" : "TS", "displayLabel" : "rm.caveat.classification.mark.ts" - }, + } + ] + }, + { + "id" : "classification", + "displayLabel" : "rm.caveat.classification.group", + "description" : "rm.caveat.classification.description", + "type" : "HIERARCHICAL", + "marks" : + [ { - "displayLabel" : "rm.caveat.classification.mark.s" - }, - { - "id" : "C", - "displayLabel" : "rm.caveat.classification.mark.c" + "id" : "XYZ", + "displayLabel" : "rm.caveat.classification.mark.ts" } ] } diff --git a/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingId.json b/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingId.json deleted file mode 100644 index 2bcded6c7b..0000000000 --- a/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingId.json +++ /dev/null @@ -1,28 +0,0 @@ -[ - { - "id" : "classification", - "displayLabel" : "rm.caveat.classification.group", - "description" : "rm.caveat.classification.description", - "type" : "HIERARCHICAL", - "marks" : - [ - { - "id" : "TS", - "displayLabel" : "rm.caveat.classification.mark.ts" - } - ] - }, - { - "id" : "classification", - "displayLabel" : "rm.caveat.classification.group", - "description" : "rm.caveat.classification.description", - "type" : "HIERARCHICAL", - "marks" : - [ - { - "id" : "TS", - "displayLabel" : "rm.caveat.classification.mark.ts" - } - ] - } -] \ No newline at end of file diff --git a/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingMarkId.json b/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingMarkId.json new file mode 100644 index 0000000000..01a5d8f985 --- /dev/null +++ b/rm-server/unit-test/resources/alfresco/caveat/rm-caveats-missingMarkId.json @@ -0,0 +1,22 @@ +[ + { + "id" : "classification", + "displayLabel" : "rm.caveat.classification.group", + "description" : "rm.caveat.classification.description", + "type" : "HIERARCHICAL", + "marks" : + [ + { + "id" : "TS", + "displayLabel" : "rm.caveat.classification.mark.ts" + }, + { + "displayLabel" : "rm.caveat.classification.mark.s" + }, + { + "id" : "C", + "displayLabel" : "rm.caveat.classification.mark.c" + } + ] + } +] \ No newline at end of file