You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2017/11/07 10:18:38 UTC

[sling-org-apache-sling-testing-jcr-mock] annotated tag org.apache.sling.testing.jcr-mock-1.1.16 created (now 84a4546)

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a change to annotated tag org.apache.sling.testing.jcr-mock-1.1.16
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git.


      at 84a4546  (tag)
 tagging 03aaa265b2b0a8160e529e5c176d6e96b47f8955 (commit)
      by Stefan Seifert
      on Wed Sep 14 21:25:00 2016 +0000

- Log -----------------------------------------------------------------
org.apache.sling.testing.jcr-mock-1.1.16
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new e697dd2  SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
     new 59f3796  svn:ignore
     new 53b9043  SLING-4042 mock documentation
     new cf742dd  SLING-4042 move all mock projects to mocks/ subdirectory
     new 30f47ae  SLING-4042 make sure JCR mock supports accessing data using multiple sessions
     new d585caf  SLING-4042 minor optimization
     new 858def9  SLING-4042 add README files
     new 95f9f5c  add/update SCM urls
     new a1e6d99  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.0.0
     new 47927de  [maven-release-plugin] prepare for next development iteration
     new a61646c  SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
     new 43a8db7  SLING-4108 JCR/Sling/ResourceResolver Mock: Support providing authentication info
     new 10fb560  SLING-4230 Add support for mocking queries and query results
     new 5f38816  SLING-4230 Add support for mocking queries and query results
     new 86f801a  SLING-4230 Add support for mocking queries and query results
     new 77fa4b5  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.0
     new 237edcb  [maven-release-plugin] prepare for next development iteration
     new f47dab8  SLING-4237 - JCR Mock implementation should have "throws RepositoryException"
     new 40be38a  SLING-4237 - remove unused imports introduced in previous commit
     new 422e276  SLING-4238 - Jcr Mock does not normalize paths
     new 09e313a  remove unused import
     new ed1a43b  SLING-4237 - JCR Mock implementation should have "throws RepositoryException" - add exceptions also to MockQuery* classes
     new c0d5b79  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.2
     new d4fe35a  [maven-release-plugin] prepare for next development iteration
     new 9d528c0  SLING-4362 make sure JCR namespaces are correctly registered in JCR mock on initialization through sling mock
     new a6d7286  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.4
     new 79cb9b2  [maven-release-plugin] prepare for next development iteration
     new 6e98697  SLING-4548 workaround for setting jcr:created/jcr:createdBy and new state properly when creating nt:file nodes
     new d82271f  SLING-4695 - MockNode.getProperties() does not contain jcr:primaryType
     new a5f4254  SLING-4695 - MockNode.getProperties() does not contain jcr:primaryType
     new a08e2f6  SLING-4698 - Set parent.relativePath to empty for all modules
     new 9f5e826  remove unused import
     new 416d4ad  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.6
     new c0f7468  [maven-release-plugin] prepare for next development iteration
     new 07d129d  SLING-4802 JcrMock: Support Session close and isLive methods
     new 6d0ab9f  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.8
     new ed55320  [maven-release-plugin] prepare for next development iteration
     new 7110c38  Update to Sling Parent 23
     new f936863  Testing: remove superflous sling.java.version=6 as it's the default now
     new a6caf4f  set parent version to 24 and add empty relativePath where missing
     new 1dbd750  SLING-4962: getNodes() always returns empty iterator for root node
     new df68dfc  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.10
     new 22c657e  [maven-release-plugin] prepare for next development iteration
     new 3280a49  Update the main reactor to parent 25
     new 4b5d898  SLING-5257 MockProperty getType generates java.lang.ArrayIndexOutOfBoundsException when the underlying array value is empty
     new 2c7832b  SLING-5250 MockProperty getValues does not comply with JCR 2.0 API
     new 33a8030  Switch to parent pom 26
     new 1248126  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.12
     new 6744799  [maven-release-plugin] prepare for next development iteration
     new 8d5810f  SLING-5774 jcr-mock: Support Node.getMixinNodeTypes
     new 0766328  SLING-5775 jcr-mock: Support PropertyDefinition flags
     new 39397f7  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.14
     new 5168c8d  [maven-release-plugin] prepare for next development iteration
     new 6e44467  SLING-5881 jcr-mock: Dummy implementations for unsupported operations of MockObservationManager
     new 79f0fe1  [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.16
     new 03aaa26  [maven-release-plugin] copy for tag org.apache.sling.testing.jcr-mock-1.1.16

The 56 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


-- 
To stop receiving notification emails like this one, please contact
['"commits@sling.apache.org" <co...@sling.apache.org>'].

[sling-org-apache-sling-testing-jcr-mock] 03/04: [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.16

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.16
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit 79f0fe1c75ef948c5586ee20cfbc3fffce087ec9
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 14 21:24:47 2016 +0000

    [maven-release-plugin] prepare release org.apache.sling.testing.jcr-mock-1.1.16
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1760772 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index 5057644..7cf26c4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-    <version>1.1.15-SNAPSHOT</version>
+    <version>1.1.16</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing JCR Mock</name>
     <description>Mock implementation of selected JCR APIs.</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/jcr-mock</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.16</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.16</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.jcr-mock-1.1.16</url>
     </scm>
 
     <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-jcr-mock] 04/04: [maven-release-plugin] copy for tag org.apache.sling.testing.jcr-mock-1.1.16

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.16
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit 03aaa265b2b0a8160e529e5c176d6e96b47f8955
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Sep 14 21:25:00 2016 +0000

    [maven-release-plugin] copy for tag org.apache.sling.testing.jcr-mock-1.1.16
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.16@1760773 13f79535-47bb-0310-9956-ffa450edef68

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-jcr-mock] 02/04: SLING-5881 jcr-mock: Dummy implementations for unsupported operations of MockObservationManager

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.16
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit 6e44467f8783202e3c4b89da210e5e37a458686c
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jul 21 08:54:17 2016 +0000

    SLING-5881 jcr-mock: Dummy implementations for unsupported operations of MockObservationManager
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1753652 13f79535-47bb-0310-9956-ffa450edef68
---
 .../mock/jcr/MockEventListenerIterator.java        | 39 ++++++++++++++++++++++
 .../testing/mock/jcr/MockObservationManager.java   | 13 +++++---
 .../sling/testing/mock/jcr/MockWorkspaceTest.java  | 15 ++++++---
 3 files changed, 57 insertions(+), 10 deletions(-)

diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockEventListenerIterator.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockEventListenerIterator.java
new file mode 100644
index 0000000..a051643
--- /dev/null
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockEventListenerIterator.java
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.sling.testing.mock.jcr;
+
+import java.util.Collection;
+
+import javax.jcr.observation.EventListener;
+import javax.jcr.observation.EventListenerIterator;
+
+import org.apache.jackrabbit.commons.iterator.RangeIteratorAdapter;
+
+class MockEventListenerIterator extends RangeIteratorAdapter implements EventListenerIterator {
+    
+    public MockEventListenerIterator(Collection collection) {
+        super(collection);
+    }
+
+    @Override
+    public EventListener nextEventListener() {
+        return (EventListener)this.next();
+    }
+
+}
diff --git a/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java b/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
index b1ea937..f2cbe5f 100644
--- a/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
+++ b/src/main/java/org/apache/sling/testing/mock/jcr/MockObservationManager.java
@@ -18,6 +18,8 @@
  */
 package org.apache.sling.testing.mock.jcr;
 
+import java.util.Collections;
+
 import javax.jcr.RepositoryException;
 import javax.jcr.observation.EventJournal;
 import javax.jcr.observation.EventListener;
@@ -41,26 +43,27 @@ class MockObservationManager implements ObservationManager {
         // do nothing
     }
 
-    // --- unsupported operations ---
     @Override
     public EventListenerIterator getRegisteredEventListeners() throws RepositoryException {
-        throw new UnsupportedOperationException();
+        return new MockEventListenerIterator(Collections.emptyList());
     }
 
     @Override
     public void setUserData(final String userData) throws RepositoryException {
-        throw new UnsupportedOperationException();
+        // accept call but ignore it
     }
 
     @Override
     public EventJournal getEventJournal() throws RepositoryException {
-        throw new UnsupportedOperationException();
+        // always return null
+        return null;
     }
 
     @Override
     public EventJournal getEventJournal(final int eventTypes, final String absPath, final boolean isDeep,
             final String[] uuid, final String[] nodeTypeName) throws RepositoryException {
-        throw new UnsupportedOperationException();
+        // always return null
+        return null;
     }
 
 }
diff --git a/src/test/java/org/apache/sling/testing/mock/jcr/MockWorkspaceTest.java b/src/test/java/org/apache/sling/testing/mock/jcr/MockWorkspaceTest.java
index 662a623..cd4830e 100644
--- a/src/test/java/org/apache/sling/testing/mock/jcr/MockWorkspaceTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/jcr/MockWorkspaceTest.java
@@ -19,7 +19,9 @@
 package org.apache.sling.testing.mock.jcr;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
 
 import javax.jcr.RepositoryException;
 import javax.jcr.Workspace;
@@ -49,11 +51,14 @@ public class MockWorkspaceTest {
 
     @Test
     public void testObservationManager() throws RepositoryException {
-        // just mage sure listener methods can be called, although they do
-        // nothing
-        ObservationManager observationManager = underTest.getObservationManager();
-        observationManager.addEventListener(null, 0, null, false, null, null, false);
-        observationManager.removeEventListener(null);
+        // just make sure observation manager methods can be called, although they do nothing
+        ObservationManager mgr = underTest.getObservationManager();
+        mgr.addEventListener(null, 0, null, false, null, null, false);
+        mgr.removeEventListener(null);
+        assertFalse(mgr.getRegisteredEventListeners().hasNext());
+        mgr.setUserData("abc");
+        assertNull(mgr.getEventJournal());
+        assertNull(mgr.getEventJournal(0, "/any", true, null, null));
     }
 
     @Test

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.

[sling-org-apache-sling-testing-jcr-mock] 01/04: [maven-release-plugin] prepare for next development iteration

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to annotated tag org.apache.sling.testing.jcr-mock-1.1.16
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-jcr-mock.git

commit 5168c8d15cb7a2fe9898ad8d17e598b0934d4410
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jun 10 12:10:58 2016 +0000

    [maven-release-plugin] prepare for next development iteration
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock@1747694 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index e4b5512..5057644 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.jcr-mock</artifactId>
-    <version>1.1.14</version>
+    <version>1.1.15-SNAPSHOT</version>
     <packaging>bundle</packaging>
 
     <name>Apache Sling Testing JCR Mock</name>
     <description>Mock implementation of selected JCR APIs.</description>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.14</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.jcr-mock-1.1.14</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.jcr-mock-1.1.14</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/jcr-mock</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/jcr-mock</url>
     </scm>
 
     <dependencies>

-- 
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.