jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r771289 - in /jackrabbit/trunk: jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/ jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/
Date Mon, 04 May 2009 12:42:02 GMT
Author: reschke
Date: Mon May  4 12:42:01 2009
New Revision: 771289

URL: http://svn.apache.org/viewvc?rev=771289&view=rev
Log:
JCR-2085: move SessionRemoveItemTest

Added:
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionRemoveItemTest.java
      - copied, changed from r771283, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/SessionRemoveItemTest.java
Removed:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/SessionRemoveItemTest.java
Modified:
    jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/TestAll.java
    jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TestAll.java

Modified: jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/TestAll.java?rev=771289&r1=771288&r2=771289&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/TestAll.java
Mon May  4 12:42:01 2009
@@ -26,8 +26,6 @@
     public static Test suite() {
         TestSuite suite = new TestSuite("javax.jcr tests");
 
-        suite.addTestSuite(SessionRemoveItemTest.class);
-
         return suite;
     }
 }
\ No newline at end of file

Copied: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionRemoveItemTest.java
(from r771283, jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/SessionRemoveItemTest.java)
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionRemoveItemTest.java?p2=jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionRemoveItemTest.java&p1=jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/SessionRemoveItemTest.java&r1=771283&r2=771289&rev=771289&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/test/java/org/apache/jackrabbit/api/jsr283/SessionRemoveItemTest.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/SessionRemoveItemTest.java
Mon May  4 12:42:01 2009
@@ -14,10 +14,11 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.jackrabbit.api.jsr283;
+package org.apache.jackrabbit.test.api;
 
 import javax.jcr.AccessDeniedException;
 import javax.jcr.InvalidItemStateException;
+import javax.jcr.Node;
 import javax.jcr.Property;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
@@ -28,36 +29,22 @@
 import org.apache.jackrabbit.test.AbstractJCRTest;
 import org.apache.jackrabbit.test.NotExecutableException;
 import org.apache.jackrabbit.test.RepositoryStub;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 
 /** <code>SessionRemoveItemTest</code>... */
 public class SessionRemoveItemTest extends AbstractJCRTest {
 
-    private static Logger log = LoggerFactory.getLogger(SessionRemoveItemTest.class);
-
     private Session adminSession;
     private Session readOnlySession;
 
-    private javax.jcr.Node removeNode;
+    private Node removeNode;
     private String nPath;
 
     protected void setUp() throws Exception {
         super.setUp();
 
-        // TODO: rm casts once jsr283 is released
-        if (superuser instanceof Session) {
-            adminSession = (Session) superuser;
-        } else {
-            throw new NotExecutableException("javax.jcr.Session expected.");
-        }
+        adminSession = superuser;
 
-        javax.jcr.Session s = helper.getReadOnlySession();
-        if (s instanceof Session) {
-            readOnlySession = (Session) s;
-        } else {
-            throw new NotExecutableException("javax.jcr.Session expected.");
-        }
+        readOnlySession = helper.getReadOnlySession();
 
         removeNode = testRootNode.addNode(nodeName1, testNodeType);
         testRootNode.save();
@@ -131,7 +118,7 @@
 
     public void testRemoveLockedChildItem() throws RepositoryException, NotExecutableException
{
         // add a child property and a child node to test deep lock effect.
-        javax.jcr.Node childN = removeNode.addNode(nodeName2);
+        Node childN = removeNode.addNode(nodeName2);
         Value v = getJcrValue(superuser, RepositoryStub.PROP_PROP_VALUE2, RepositoryStub.PROP_PROP_TYPE2,
"propvalue2");        
         Property childP = removeNode.setProperty(propertyName2, v);
         removeNode.save();
@@ -175,7 +162,7 @@
 
     public void testRemoveCheckedInItem() throws RepositoryException, NotExecutableException
{
         // add a child property and a child node to test deep lock effect.
-        javax.jcr.Node childN = removeNode.addNode(nodeName2);
+        Node childN = removeNode.addNode(nodeName2);
         Value v = getJcrValue(superuser, RepositoryStub.PROP_PROP_VALUE2, RepositoryStub.PROP_PROP_TYPE2,
"propvalue2");
         Property childP = removeNode.setProperty(propertyName2, v);
         removeNode.save();

Modified: jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TestAll.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TestAll.java?rev=771289&r1=771288&r2=771289&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TestAll.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-tests/src/main/java/org/apache/jackrabbit/test/api/TestAll.java
Mon May  4 12:42:01 2009
@@ -137,6 +137,10 @@
 
         // JCR 2.0
         
+        //// new Session features
+        
+        suite.addTestSuite(SessionRemoveItemTest.class);
+
         //// new Workspace features
         
         suite.addTestSuite(WorkspaceTest.class);



Mime
View raw message