Resolve ALF-5079 - NodeDAO: add missing aspects regress (when aspect has same name as assoc)

- note: was "MT: attempt to create new tenant after upgrade from pre-3.4 fails"

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23091 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Jan Vonka
2010-10-14 10:27:36 +00:00
parent 5aa58d6b6e
commit 6cde9bdd2b
3 changed files with 56 additions and 15 deletions

View File

@@ -736,14 +736,18 @@ public abstract class BaseNodeServiceTest extends BaseSpringTest
ContentModel.TYPE_CMOBJECT).getChildRef();
assertTrue("Aspect not automatically added by child association during 'createNode'",
nodeService.hasAspect(nodeRef, BaseNodeServiceTest.ASPECT_WITH_ASSOCIATIONS));
assertFalse("Unexpected 'aspect' added by child association during 'createNode'",
nodeService.hasAspect(nodeRef, BaseNodeServiceTest.ASSOC_ASPECT_CHILD_ASSOC));
nodeService.removeAspect(nodeRef, BaseNodeServiceTest.ASPECT_WITH_ASSOCIATIONS);
assertFalse("Child node should have been deleted", nodeService.exists(childNodeRef));
// Check that normal association creation adds the aspect to the source
nodeService.createAssociation(nodeRef, rootNodeRef, BaseNodeServiceTest.ASSOC_ASPECT_NORMAL_ASSOC);
assertTrue("Aspect not automatically added by child association during 'createAssociation'",
assertTrue("Aspect not automatically added by peer association during 'createAssociation'",
nodeService.hasAspect(nodeRef, BaseNodeServiceTest.ASPECT_WITH_ASSOCIATIONS));
assertFalse("Unexpected aspect added by peer association during 'createAssociation'",
nodeService.hasAspect(nodeRef, BaseNodeServiceTest.ASSOC_ASPECT_NORMAL_ASSOC));
}
public void testAspectRemoval() throws Exception