jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r161260 [7/7] - in incubator/jackrabbit/trunk: ./ applications/test/ applications/test/repository/nodetypes/ contrib/orm-persistence/applications/test/ contrib/orm-persistence/applications/test/repository/nodetypes/ src/java/org/apache/jackrabbit/core/ src/java/org/apache/jackrabbit/core/lock/ src/java/org/apache/jackrabbit/core/nodetype/ src/java/org/apache/jackrabbit/core/nodetype/virtual/ src/java/org/apache/jackrabbit/core/nodetype/xml/ src/java/org/apache/jackrabbit/core/observation/ src/java/org/apache/jackrabbit/core/search/ src/java/org/apache/jackrabbit/core/search/lucene/ src/java/org/apache/jackrabbit/core/security/ src/java/org/apache/jackrabbit/core/util/ src/java/org/apache/jackrabbit/core/version/ src/java/org/apache/jackrabbit/core/virtual/ src/java/org/apache/jackrabbit/core/xml/ src/test/org/apache/jackrabbit/core/nodetype/xml/ src/test/org/apache/jackrabbit/core/observation/ src/test/org/apache/jackrabbit/core/search/ src/test/org/apache/jackrabbit/test/api/ src/test/org/apache/jackrabbit/test/api/lock/ src/test/org/apache/jackrabbit/test/api/nodetype/ src/test/org/apache/jackrabbit/test/api/nodetype/spec/ src/test/org/apache/jackrabbit/test/api/observation/ src/test/org/apache/jackrabbit/test/api/query/ src/test/org/apache/jackrabbit/test/api/version/
Date Thu, 14 Apr 2005 11:51:04 GMT
Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/observation/NodeReorderTest.java
Thu Apr 14 04:50:38 2005
@@ -129,7 +129,7 @@
          *      + nodename1[3] (was 2)
          */
         Node n = testRootNode.addNode(nodeName1, testNodeType);
-        if (!n.getDefinition().allowSameNameSibs()) {
+        if (!n.getDefinition().allowsSameNameSiblings()) {
             throw new NotExecutableException("Node at " + testRoot + " does not allow same
name siblings with name " + nodeName1);
         }
         testRootNode.addNode(nodeName1, testNodeType);
@@ -200,7 +200,7 @@
          *      + nodename1[3] (was 2)
          */
         Node n = testRootNode.addNode(nodeName1, testNodeType);
-        if (!n.getDefinition().allowSameNameSibs()) {
+        if (!n.getDefinition().allowsSameNameSiblings()) {
             throw new NotExecutableException("Node at " + testRoot + " does not allow same
name siblings with name " + nodeName1);
         }
         testRootNode.addNode(nodeName2, testNodeType);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/AbstractQueryTest.java
Thu Apr 14 04:50:38 2005
@@ -175,7 +175,7 @@
         // now check property count
         int count = 0;
         log.println("Properties:");
-        String[] propNames = result.getPropertyNames();
+        String[] propNames = result.getColumnNames();
         for (RowIterator it = result.getRows(); it.hasNext();) {
             StringBuffer msg = new StringBuffer();
             Value[] values = it.nextRow().getValues();

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/ElementTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/ElementTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/ElementTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/ElementTest.java
Thu Apr 14 04:50:38 2005
@@ -143,7 +143,7 @@
      */
     public void testElementTestNameTestSomeNTWithSNS() throws RepositoryException, NotExecutableException
{
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
-        if (!n1.getDefinition().allowSameNameSibs()) {
+        if (!n1.getDefinition().allowsSameNameSiblings()) {
             throw new NotExecutableException("Node at " + testRoot + " does not allow same
name siblings with name " + nodeName1);
         }
         testRootNode.addNode(nodeName1, ntBase);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathLevel1Test.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathLevel1Test.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathLevel1Test.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathLevel1Test.java
Thu Apr 14 04:50:38 2005
@@ -22,7 +22,7 @@
 import javax.jcr.ItemNotFoundException;
 
 /**
- * Test the method {@link Query#getPersistentQueryPath()}.
+ * Test the method {@link Query#getStoredQueryPath()}.
  *
  * @test
  * @sources GetPersistentQueryPathLevel1Test.java
@@ -56,14 +56,14 @@
 
     /**
      * Tests if a non-persistent query throws an {@link ItemNotFoundException}
-     * when {@link Query#getPersistentQueryPath()} is called.
+     * when {@link Query#getStoredQueryPath()} is called.
      */
-    public void testGetPersistentQueryPath() throws RepositoryException {
+    public void getStoredQueryPath() throws RepositoryException {
         String statement = "/" + jcrRoot;
         Query q = session.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         try {
-            q.getPersistentQueryPath();
-            fail("Query.getPersistentQueryPath() on a transient query must throw an ItemNotFoundException.");
+            q.getStoredQueryPath();
+            fail("Query.getStoredQueryPath() on a transient query must throw an ItemNotFoundException.");
         } catch (ItemNotFoundException e) {
             // success
         }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPersistentQueryPathTest.java
Thu Apr 14 04:50:38 2005
@@ -20,7 +20,7 @@
 import javax.jcr.RepositoryException;
 
 /**
- * Test the method {@link Query#getPersistentQueryPath()}.
+ * Test the method {@link javax.jcr.query.Query#getStoredQueryPath()}.
  *
  * @tck.config testroot node that allows to create a child node of type nt:query.
  * @tck.config nodename1 name of an nt:query node that can becreated below the
@@ -34,16 +34,16 @@
 public class GetPersistentQueryPathTest extends AbstractQueryTest {
 
     /**
-     * Tests if {@link Query#getPersistentQueryPath()} returns the correct
+     * Tests if {@link Query#getStoredQueryPath()} returns the correct
      * path where the query had been saved.
      */
     public void testGetPersistentQueryPath() throws RepositoryException {
         String statement = "/" + jcrRoot;
         Query q = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         String path = testRoot + "/" + nodeName1;
-        q.save(path);
+        q.storeAsNode(path);
         assertEquals("Query.getPersistentQueryPath() does not return the correct path.",
                 path,
-                q.getPersistentQueryPath());
+                q.getStoredQueryPath());
     }
 }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPropertyNamesTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPropertyNamesTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPropertyNamesTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/GetPropertyNamesTest.java
Thu Apr 14 04:50:38 2005
@@ -20,7 +20,7 @@
 import javax.jcr.query.QueryResult;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
-import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.PropertyDefinition;
 import java.util.Arrays;
 import java.util.List;
 import java.util.ArrayList;
@@ -71,7 +71,7 @@
         QueryResult result = query.execute();
 
         // Get the node's non-residual properties
-        PropertyDef[] pd = superuser.getWorkspace().getNodeTypeManager().getNodeType(ntBase).getDeclaredPropertyDefs();
+        PropertyDefinition[] pd = superuser.getWorkspace().getNodeTypeManager().getNodeType(ntBase).getDeclaredPropertyDefinitions();
 
         List singleValPropNames = new ArrayList();
         for (int i = 0; i < pd.length; i++) {
@@ -81,7 +81,7 @@
             }
         }
 
-        String[] foundPropertyNames = result.getPropertyNames();
+        String[] foundPropertyNames = result.getColumnNames();
         Object[] realPropertyNames = singleValPropNames.toArray();
 
         // sort the 2 arrays before comparing them

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJcrPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJcrPathTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJcrPathTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJcrPathTest.java
Thu Apr 14 04:50:38 2005
@@ -69,16 +69,11 @@
         String nodeTypeName = session.getRootNode().getPrimaryNodeType().getName();
         String queryStatement = "select " + jcrPath + " from " + nodeTypeName;
 
-        // verify that jcr:path is supported
-        if (session.getRepository().getDescriptor(Repository.QUERY_JCRPATH) == null) {
-            throw new NotExecutableException(jcrPath + " not supported");
-        }
-
         // execute the search query
         Query query = session.getWorkspace().getQueryManager().createQuery(queryStatement,
Query.SQL);
         QueryResult result = query.execute();
 
-        String[] propNames = result.getPropertyNames();
+        String[] propNames = result.getColumnNames();
         if (propNames.length > 0) {
             // jcr:path should be the first column
             assertEquals(jcrPath + " should be the first property", jcrPath, propNames[0]);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJoinTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJoinTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJoinTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLJoinTest.java
Thu Apr 14 04:50:38 2005
@@ -113,7 +113,7 @@
     public void testJoinSNS() throws RepositoryException, NotExecutableException {
         Node n1 = testRootNode.addNode(nodeName1, testNodeType);
         n1.addMixin(mixReferenceable);
-        if (!n1.getDefinition().allowSameNameSibs()) {
+        if (!n1.getDefinition().allowsSameNameSiblings()) {
             throw new NotExecutableException("Node at " + testRoot + " does not allow same
name siblings with name " + nodeName1);
         }
         testRootNode.addNode(nodeName1, testNodeType);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLPathTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLPathTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLPathTest.java
Thu Apr 14 04:50:38 2005
@@ -173,7 +173,8 @@
         final List descendants = new ArrayList();
 
         node.accept(new TraversingItemVisitor.Default() {
-            protected void entering(Node n, int level) {
+            protected void entering(Node n, int level)
+                    throws RepositoryException {
                 if (!node.isSame(n)) {
                     descendants.add(n);
                 }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SQLQueryLevel2Test.java
Thu Apr 14 04:50:38 2005
@@ -42,9 +42,6 @@
      * For configuration description see {@link #setUpFullTextTest()}.
      */
     public void testScoreColumn() throws Exception {
-        if (!hasDescriptor(Repository.QUERY_JCRSCORE)) {
-            throw new NotExecutableException("Repository does not support jcr:score");
-        }
         setUpFullTextTest();
         QueryResult result = execute(getFullTextStatement());
         RowIterator rows = result.getRows();
@@ -117,9 +114,6 @@
      * For configuration description see {@link #setUpFullTextTest()}.
      */
     public void testPathColumn() throws Exception {
-        if (!hasDescriptor(Repository.QUERY_JCRPATH)) {
-            throw new NotExecutableException("Repository does not support jcr:path");
-        }
         setUpFullTextTest();
         QueryResult result = execute(getFullTextStatement());
         RowIterator rows = result.getRows();

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SaveTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SaveTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SaveTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SaveTest.java
Thu Apr 14 04:50:38 2005
@@ -30,7 +30,7 @@
 import org.apache.jackrabbit.test.NotExecutableException;
 
 /**
- * Tests the method {@link javax.jcr.query.Query#save(String)}.
+ * Tests the method {@link javax.jcr.query.Query#storeAsNode(String)}.
  *
  * @test
  * @sources SaveTest.java
@@ -53,7 +53,7 @@
      */
     public void testSave() throws RepositoryException {
         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
-        query.save(testRoot + "/" + nodeName1);
+        query.storeAsNode(testRoot + "/" + nodeName1);
 
         assertTrue("Node has not been saved", testRootNode.hasNode(nodeName1));
 
@@ -70,12 +70,12 @@
      */
     public void testItemExistsException() throws RepositoryException {
         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
-        query.save(testRoot + "/" + nodeName1);
+        query.storeAsNode(testRoot + "/" + nodeName1);
 
         // create another one
         query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         try {
-            query.save(testRoot + "/" + nodeName1);
+            query.storeAsNode(testRoot + "/" + nodeName1);
             fail("Query.save() did not throw ItemExistsException");
         } catch (ItemExistsException e) {
             // expected behaviour
@@ -89,7 +89,7 @@
     public void testPathNotFoundException() throws RepositoryException {
         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         try {
-            query.save(testRoot + "/" + nodeName1 + "/" + nodeName1);
+            query.storeAsNode(testRoot + "/" + nodeName1 + "/" + nodeName1);
             fail("Query.save() must throw PathNotFoundException on invalid path");
         } catch (PathNotFoundException e) {
             // expected behaviour
@@ -127,7 +127,7 @@
         versionable.checkin();
 
         try {
-            query.save(testRoot + "/" + nodeName1 + "/" + nodeName2);
+            query.storeAsNode(testRoot + "/" + nodeName1 + "/" + nodeName2);
             fail("Query.save() must throw VersionException, parent node is checked in.");
         } catch (VersionException e) {
             // expected behaviour
@@ -147,7 +147,7 @@
         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         testRootNode.addNode(nodeName1, testNodeType);
         try {
-            query.save(testRoot + "/" + nodeName1 + "/" + nodeName2);
+            query.storeAsNode(testRoot + "/" + nodeName1 + "/" + nodeName2);
             fail("Query.save() must throw ConstraintViolationException, parent node does
not allow child nodes.");
         } catch (ConstraintViolationException e) {
             // expected behaviour
@@ -184,7 +184,7 @@
         Session readWrite = helper.getReadWriteSession();
         Query query = readWrite.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         try {
-            query.save(testRoot + "/" + nodeName1 + "/" + nodeName2);
+            query.storeAsNode(testRoot + "/" + nodeName1 + "/" + nodeName2);
             fail("Query.save() must throw LockException, parent node is locked.");
         } catch (LockException e) {
             // expected behaviour
@@ -195,12 +195,12 @@
 
     /**
      * Tests if the a {@link javax.jcr.RepositoryException} is thrown when
-     * an malformed path is passed in {@link javax.jcr.query.Query#save(String)}.
+     * an malformed path is passed in {@link javax.jcr.query.Query#storeAsNode(String)}.
      */
     public void testRepositoryException() throws RepositoryException {
         Query query = superuser.getWorkspace().getQueryManager().createQuery(statement, Query.XPATH);
         try {
-            query.save(testRoot + "/invalid[path");
+            query.storeAsNode(testRoot + "/invalid[path");
             fail("Query.save() must throw RepositoryException on malformed path.");
         } catch (RepositoryException e) {
             // expected behaviour

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SimpleSelectionTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SimpleSelectionTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SimpleSelectionTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/SimpleSelectionTest.java
Thu Apr 14 04:50:38 2005
@@ -82,6 +82,6 @@
 
         assertEquals("Should have only 1 result", 1, result.getRows().getSize());
         assertTrue("Should contain the searched property",
-                Arrays.asList(result.getPropertyNames()).contains(jcrPrimaryType));
+                Arrays.asList(result.getColumnNames()).contains(jcrPrimaryType));
     }
 }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/TextNodeTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/TextNodeTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/TextNodeTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/TextNodeTest.java
Thu Apr 14 04:50:38 2005
@@ -105,7 +105,7 @@
             throw new NotExecutableException("Repository does not support position index");
         }
         Node text1 = testRootNode.addNode(jcrXMLText);
-        if (!text1.getDefinition().allowSameNameSibs()) {
+        if (!text1.getDefinition().allowsSameNameSiblings()) {
             throw new NotExecutableException("Node at path: " + testRoot + " does not allow
same name siblings with name: " + jcrXMLText);
         }
         testRootNode.addNode(nodeName1, testNodeType);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathDocOrderTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathDocOrderTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathDocOrderTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathDocOrderTest.java
Thu Apr 14 04:50:38 2005
@@ -57,7 +57,7 @@
         tmp.append(jcrRoot).append(testRoot).append("/*");
         tmp.append("[position()=2]");
         String resultPath = "";
-        for (NodeIterator nodes = testRootNode.getNodes(); nodes.hasNext() && nodes.getPos()
< 2;) {
+        for (NodeIterator nodes = testRootNode.getNodes(); nodes.hasNext() && nodes.getPosition()
< 2;) {
             resultPath = nodes.nextNode().getPath();
         }
         docOrderTest(new Statement(tmp.toString(), Query.XPATH), resultPath);
@@ -74,7 +74,7 @@
         tmp.append(jcrRoot).append(testRoot).append("/*");
         tmp.append("[2]");
         String resultPath = "";
-        for (NodeIterator nodes = testRootNode.getNodes(); nodes.hasNext() && nodes.getPos()
< 2;) {
+        for (NodeIterator nodes = testRootNode.getNodes(); nodes.hasNext() && nodes.getPosition()
< 2;) {
             resultPath = nodes.nextNode().getPath();
         }
         docOrderTest(new Statement(tmp.toString(), Query.XPATH), resultPath);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathJcrPathTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathJcrPathTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathJcrPathTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathJcrPathTest.java
Thu Apr 14 04:50:38 2005
@@ -69,16 +69,11 @@
         String nodeTypeName = session.getRootNode().getPrimaryNodeType().getName();
         String queryStatement = "//element(*, " + nodeTypeName + ")/@" + jcrPath;
 
-        // verify that jcr:path is supported
-        if (session.getRepository().getDescriptor(Repository.QUERY_JCRPATH) == null) {
-            throw new NotExecutableException(jcrPath + " not supported");
-        }
-
         // execute the search query
         Query query = session.getWorkspace().getQueryManager().createQuery(queryStatement,
Query.XPATH);
         QueryResult result = query.execute();
 
-        String[] propNames = result.getPropertyNames();
+        String[] propNames = result.getColumnNames();
         if (propNames.length > 0) {
             // jcr:path should be the first column
             assertEquals(jcrPath + " should be the first property", jcrPath, propNames[0]);

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathQueryLevel2Test.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathQueryLevel2Test.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathQueryLevel2Test.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/query/XPathQueryLevel2Test.java
Thu Apr 14 04:50:38 2005
@@ -42,9 +42,6 @@
      * For configuration description see {@link #setUpFullTextTest()}.
      */
     public void testScoreColumn() throws Exception {
-        if (!hasDescriptor(Repository.QUERY_JCRSCORE)) {
-            throw new NotExecutableException("Repository does not support jcr:score");
-        }
         setUpFullTextTest();
         QueryResult result = execute(getFullTextStatement());
         RowIterator rows = result.getRows();
@@ -116,9 +113,6 @@
      * For configuration description see {@link #setUpFullTextTest()}.
      */
     public void testPathColumn() throws Exception {
-        if (!hasDescriptor(Repository.QUERY_JCRPATH)) {
-            throw new NotExecutableException("Repository does not support jcr:path");
-        }
         setUpFullTextTest();
         QueryResult result = execute(getFullTextStatement());
         RowIterator rows = result.getRows();

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/AbstractOnParentVersionTest.java
Thu Apr 14 04:50:38 2005
@@ -19,7 +19,7 @@
 import javax.jcr.RepositoryException;
 import javax.jcr.Property;
 import javax.jcr.Node;
-import javax.jcr.nodetype.PropertyDef;
+import javax.jcr.nodetype.PropertyDefinition;
 
 import javax.jcr.version.OnParentVersionAction;
 
@@ -46,7 +46,7 @@
         p = versionableNode.setProperty(propertyName1, initialPropValue);
 
         // assert that property has the proper opv-behaviour
-        PropertyDef pd = p.getDefinition();
+        PropertyDefinition pd = p.getDefinition();
         if (pd.getOnParentVersion() != OPVAction) {
             fail("JCR Property at '"+p.getPath()+"' does not have the required OnParentVersion
"+OnParentVersionAction.nameFromValue(OPVAction)+" definition.");
         }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/CheckoutTest.java
Thu Apr 14 04:50:38 2005
@@ -128,7 +128,7 @@
         while (propIt.hasNext()) {
             Property origProp = propIt.nextProperty();
             Property copyProp = copiedNode.getProperty(origProp.getName());
-            if (!origProp.getDefinition().isAutoCreate()) {
+            if (!origProp.getDefinition().isAutoCreated()) {
                 if (origProp.getDefinition().isMultiple()) {
                     Value[] origValues = origProp.getValues();
                     Value[] copyValues = copyProp.getValues();

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/RestoreTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/RestoreTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/RestoreTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/RestoreTest.java
Thu Apr 14 04:50:38 2005
@@ -18,7 +18,7 @@
 
 import org.apache.jackrabbit.test.NotExecutableException;
 
-import javax.jcr.nodetype.NodeDef;
+import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.OnParentVersionAction;
@@ -259,7 +259,7 @@
         try {
             Node naa = createVersionableNode(versionableNode, nodeName4, versionableNodeType);
             // Verify that nodes used for the test have proper opv behaviour
-            NodeDef nd = naa.getDefinition();
+            NodeDefinition nd = naa.getDefinition();
             if (nd.getOnParentVersion() != OnParentVersionAction.COPY && nd.getOnParentVersion()
!= OnParentVersionAction.VERSION) {
                 throw new NotExecutableException("Child nodes must have OPV COPY or VERSION
in order to be able to test Node.restore with uuid conflict.");
             }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/VersionTest.java
Thu Apr 14 04:50:38 2005
@@ -219,13 +219,13 @@
      */
     /*
     public void testGetDefinition() throws Exception {
-        assertFalse("Version.getDefinition() does not return correct Node definition", version.getDefinition().allowSameNameSibs());
+        assertFalse("Version.getDefinition() does not return correct Node definition", version.getDefinition().allowsSameNameSiblings());
         assertEquals("Version.getDefinition() does not return correct Node definition", ntVersionHistory,
version.getDefinition().getDeclaringNodeType().getName());
         assertNull("Version.getDefinition() does not return correct Node definition", version.getDefinition().getDefaultPrimaryType());
         assertEquals("Version.getDefinition() does not return correct Node definition", jcrFrozenNode,
version.getDefinition().getName());
         assertEquals("Version.getDefinition() does not return correct Node definition", OnParentVersionAction.ABORT,
version.getDefinition().getOnParentVersion());
         assertEquals("Version.getDefinition() does not return correct Node definition", jcrFrozenNode,
(version.getDefinition().getRequiredPrimaryTypes())[0].getName());
-        assertFalse("Version.getDefinition() does not return correct Node definition", version.getDefinition().isAutoCreate());
+        assertFalse("Version.getDefinition() does not return correct Node definition", version.getDefinition().isAutoCreated());
         assertFalse("Version.getDefinition() does not return correct Node definition", version.getDefinition().isMandatory());
         assertTrue("Version.getDefinition() does not return correct Node definition", version.getDefinition().isProtected());
     }

Modified: incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java
URL: http://svn.apache.org/viewcvs/incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java?view=diff&r1=161259&r2=161260
==============================================================================
--- incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java
(original)
+++ incubator/jackrabbit/trunk/src/test/org/apache/jackrabbit/test/api/version/WorkspaceRestoreTest.java
Thu Apr 14 04:50:38 2005
@@ -18,7 +18,7 @@
 
 import org.apache.jackrabbit.test.NotExecutableException;
 
-import javax.jcr.nodetype.NodeDef;
+import javax.jcr.nodetype.NodeDefinition;
 import javax.jcr.version.Version;
 import javax.jcr.version.VersionException;
 import javax.jcr.version.OnParentVersionAction;
@@ -201,7 +201,7 @@
     public void testWorkspaceRestoreWithUUIDConflict() throws RepositoryException, NotExecutableException
{
         try {
             // Verify that nodes used for the test are indeed versionable
-            NodeDef nd = wVersionableNode.getDefinition();
+            NodeDefinition nd = wVersionableNode.getDefinition();
             if (nd.getOnParentVersion() != OnParentVersionAction.COPY && nd.getOnParentVersion()
!= OnParentVersionAction.VERSION) {
                 throw new NotExecutableException("Nodes must be versionable in order to run
this test.");
             }



Mime
View raw message