From 46ceced3217d1546ab5236abb08c5474c6dc0953 Mon Sep 17 00:00:00 2001 From: Pavel Yurke Date: Fri, 7 Nov 2014 10:47:34 +0000 Subject: [PATCH] Merged HEAD-MNT-2904 to HEAD (5.0.0) 89997: ACE-2904: Localised labels for type, aspect and property definitions are no longer returned - Update base types. Appropriate unit test was added. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@90092 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../org/alfresco/opencmis/CMISTest.java | 34 ++++++++++++------- 1 file changed, 22 insertions(+), 12 deletions(-) diff --git a/source/test-java/org/alfresco/opencmis/CMISTest.java b/source/test-java/org/alfresco/opencmis/CMISTest.java index 991bd4dedb..5835621bc7 100644 --- a/source/test-java/org/alfresco/opencmis/CMISTest.java +++ b/source/test-java/org/alfresco/opencmis/CMISTest.java @@ -2720,25 +2720,35 @@ public class CMISTest { for (int i = 0; i < types.length; i++) { + + List baseTypes = cmisDictionaryService.getBaseTypes(); + assertNotNull(baseTypes); + checkDefs(baseTypes); + List children = cmisDictionaryService.getChildren(types[i]); assertNotNull(children); // Check that children were updated - for (TypeDefinitionWrapper child : children) - { - assertNotNull("Type definition was not updated. Please refer to ACE-3322", child.getTypeDefinition(false).getDisplayName()); - assertNotNull("Type definition was not updated. Please refer to ACE-3322", child.getTypeDefinition(false).getDescription()); - - // Check that property's display name and description were updated - for (PropertyDefinitionWrapper property : child.getProperties()) - { - assertNotNull("Display name is null", property.getPropertyDefinition().getDisplayName()); - assertNotNull("Description is null", property.getPropertyDefinition().getDescription()); - } - } + checkDefs(children); } return ""; }; + + private void checkDefs(List defs) + { + for (TypeDefinitionWrapper def : defs) + { + assertNotNull("Type definition was not updated. Please refer to ACE-3322", def.getTypeDefinition(false).getDisplayName()); + assertNotNull("Type definition was not updated. Please refer to ACE-3322", def.getTypeDefinition(false).getDescription()); + + // Check that property's display name and description were updated + for (PropertyDefinitionWrapper property : def.getProperties()) + { + assertNotNull("Display name is null", property.getPropertyDefinition().getDisplayName()); + assertNotNull("Description is null", property.getPropertyDefinition().getDescription()); + } + } + } }; withCmisService(callback, CmisVersion.CMIS_1_1);