[exo-jcr-commits] exo-jcr SVN: r797 - jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing.

do-not-reply at jboss.org do-not-reply at jboss.org
Fri Nov 20 11:35:02 EST 2009


Author: nzamosenchuk
Date: 2009-11-20 11:35:02 -0500 (Fri, 20 Nov 2009)
New Revision: 797

Added:
   jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSiblingsRemove.java
Log:
EXOJCR-199: Added test on SNS operations

Added: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSiblingsRemove.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSiblingsRemove.java	                        (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSiblingsRemove.java	2009-11-20 16:35:02 UTC (rev 797)
@@ -0,0 +1,62 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.exoplatform.services.jcr.api.writing;
+
+import org.exoplatform.services.jcr.JcrAPIBaseTest;
+import org.exoplatform.services.jcr.impl.core.NodeImpl;
+
+import javax.jcr.Node;
+import javax.jcr.NodeIterator;
+import javax.jcr.RepositoryException;
+
+/**
+ * @author <a href="mailto:nikolazius at gmail.com">Nikolay Zamosenchuk</a>
+ * @version $Id$
+ *
+ */
+public class TestSiblingsRemove extends JcrAPIBaseTest
+{
+
+   public void testRemoveSameNameSiblings() throws RepositoryException
+   {
+      String nodeName1 = "name";
+      NodeImpl testRootNode = (NodeImpl)root.addNode("testroot");
+      root.save();
+
+      testRootNode.addNode(nodeName1);
+      testRootNode.addNode(nodeName1);
+      testRootNode.save();
+
+      for (NodeIterator children = testRootNode.getNodes(); children.hasNext();)
+      {
+         Node child = children.nextNode();
+         child.remove();
+      }
+
+      root.save();
+
+      for (NodeIterator children = testRootNode.getNodes(); children.hasNext();)
+      {
+         Node child = children.nextNode();
+         child.remove();
+      }
+      root.save();
+   }
+
+}


Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/api/writing/TestSiblingsRemove.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the exo-jcr-commits mailing list