@@ -0,0 +1,1830 @@
+/*%0A * Copyright (C) 2004-2006  exedio GmbH (www.exedio.com)%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA%0A */%0A%0Apackage com.exedio.cope;%0A%0A%0Apublic class DeleteHierarchyTest extends AbstractLibTest%0A%7B%0A%09public DeleteHierarchyTest()%0A%09%7B%0A%09%09super(Main.deleteHierarchyModel);%0A%09%7D%0A%09%0A%09public void testIt()%0A%09%7B%0A%09%09// test model%0A%09%09assertEquals(list(), DeleteHierarchySource.TYPE.getDeclaredReferences());%0A%09%09assertEquals(list(), DeleteHierarchySource.TYPE.getReferences());%0A%09%09assertEquals(list(DeleteHierarchySource.target), DeleteHierarchyTargetSuper.TYPE.getDeclaredReferences());%0A%09%09assertEquals(list(DeleteHierarchySource.target), DeleteHierarchyTargetSuper.TYPE.getReferences());%0A%09%09assertEquals(list(), DeleteHierarchyTargetSub.TYPE.getDeclaredReferences());%0A%09%09assertEquals(list(DeleteHierarchySource.target), DeleteHierarchyTargetSub.TYPE.getReferences());%0A%09%09%0A%09%09// test persistence%0A%09%09final DeleteHierarchyTargetSub target = new DeleteHierarchyTargetSub(%22target%22);%0A%09%09final DeleteHierarchySource source = new DeleteHierarchySource(target);%0A%09%09target.deleteCopeItem();%0A%09%09assertFalse(source.existsCopeItem());%0A%09%09assertFalse(target.existsCopeItem());%0A%09%7D%0A%7D%0A

fix for r5326: fix bug with DeletePolicy.CASCADE and polymorphic ItemAttributes