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:27:42 UTC

[sling-org-apache-sling-testing-sling-mock] annotated tag org.apache.sling.testing.sling-mock-jackrabbit-0.1.2 created (now 1ed0019)

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

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


      at 1ed0019  (tag)
 tagging ea0c35bc02e086f3e79c8a174c4ba3980fabd4c3 (commit)
      by Stefan Seifert
      on Thu Jan 22 20:53:43 2015 +0000

- Log -----------------------------------------------------------------
org.apache.sling.testing.sling-mock-jackrabbit-0.1.2
-----------------------------------------------------------------------

This annotated tag includes the following new commits:

     new 8230617  SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
     new a192d31  remove exclusion no longer required
     new b88c759  svn:ignore
     new b556108  SLING-4042 move all mock projects to mocks/ subdirectory
     new 3e38f03  SLING-4042 make sure JCR mock supports accessing data using multiple sessions
     new 1574600  SLING-4042 add README files
     new 29ec239  add/update SCM urls
     new cfa692f  update to released versions
     new d8c6833  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-jackrabbit-0.1.0
     new f7e1c17  [maven-release-plugin] prepare for next development iteration
     new 1abfb42  update dependencies in release process to next snapshot version
     new 62c020e  update README
     new bbfca8c  set to released version now available on maven central
     new 77e2322  SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
     new 626a8a9  SLING-4108 default to getAdministrativeResourceResolver in sling-mock to support jackrabbit resource resolver adapter as well
     new 2424eb2  SLING-4267 update to latest sling-mock snapshot
     new c6c5f9e  SLING-4267 support importing nt:resource noded in jackrabbit with empty binary data enable content loader unit tests in sling-mock-jackrabbit
     new 8564260  update dependencies to released versions
     new 3a4968e  [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-jackrabbit-0.1.2
     new ea0c35b  [maven-release-plugin]  copy for tag org.apache.sling.testing.sling-mock-jackrabbit-0.1.2

The 20 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-sling-mock] 06/20: SLING-4042 add README files

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 1574600372efa1138b1201cc7033a674119c09ca
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Oct 16 19:09:39 2014 +0000

    SLING-4042 add README files
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632415 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/README.txt b/README.txt
new file mode 100644
index 0000000..ade92f2
--- /dev/null
+++ b/README.txt
@@ -0,0 +1,8 @@
+Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver
+
+Implements a resource resolver type for Jackrabbit that can be used in unit tests based on Sling Mocks.
+
+This is a separate maven artifacts because it introduces a lot of further dependencies.
+
+Documentation:
+http://sling.apache.org/documentation/development/sling-mock.html

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

[sling-org-apache-sling-testing-sling-mock] 20/20: [maven-release-plugin] copy for tag org.apache.sling.testing.sling-mock-jackrabbit-0.1.2

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit ea0c35bc02e086f3e79c8a174c4ba3980fabd4c3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jan 22 20:53:43 2015 +0000

    [maven-release-plugin]  copy for tag org.apache.sling.testing.sling-mock-jackrabbit-0.1.2
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.2@1654061 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-sling-mock] 11/20: update dependencies in release process to next snapshot version

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 1abfb42fbbb8a939159014e7ab9ceecda4efa4dd
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:25:32 2014 +0000

    update dependencies in release process to next snapshot version
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632510 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 97b73ff..e8606d4 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 09/20: [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-jackrabbit-0.1.0

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit d8c68339457f6bbe5faaf25ff448e183ea085efb
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:23:56 2014 +0000

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

diff --git a/pom.xml b/pom.xml
index 24292a7..3f23938 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
-    <version>1.0.0-SNAPSHOT</version>
+    <version>0.1.0</version>
     <packaging>jar</packaging>
   
     <name>Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver</name>
@@ -39,9 +39,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock-jackrabbit</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</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-sling-mock] 17/20: SLING-4267 support importing nt:resource noded in jackrabbit with empty binary data enable content loader unit tests in sling-mock-jackrabbit

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit c6c5f9e7ac2a51763be0611a0cc5fdb23a2b3af1
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Jan 14 12:06:25 2015 +0000

    SLING-4267 support importing nt:resource noded in jackrabbit with empty binary data
    enable content loader unit tests in sling-mock-jackrabbit
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1651632 13f79535-47bb-0310-9956-ffa450edef68
---
 .../jackrabbit/contentimport/ContentLoaderJsonDamTest.java     | 10 +++++-----
 .../sling/jackrabbit/contentimport/ContentLoaderJsonTest.java  | 10 +++++-----
 src/test/resources/SLING-INF/nodetypes/app.cnd                 |  8 ++++++++
 3 files changed, 18 insertions(+), 10 deletions(-)

diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java
index b3ee20a..25053c6 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java
@@ -28,10 +28,7 @@ import org.apache.sling.commons.testing.jcr.RepositoryUtil;
 import org.apache.sling.testing.mock.sling.MockSling;
 import org.apache.sling.testing.mock.sling.ResourceResolverType;
 import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderJsonDamTest;
-import org.junit.Ignore;
 
-//TEST IS DISABLED currently, it does not work with jackrabbit repository yet
-@Ignore
 public class ContentLoaderJsonDamTest extends AbstractContentLoaderJsonDamTest {
 
     @Override
@@ -43,9 +40,12 @@ public class ContentLoaderJsonDamTest extends AbstractContentLoaderJsonDamTest {
     protected ResourceResolver newResourceResolver() {
         ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
 
-        // register sling node types
+        // register sling and app node types
         try {
-            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+            Session session = resolver.adaptTo(Session.class);
+            RepositoryUtil.registerSlingNodeTypes(session);
+            RepositoryUtil.registerNodeType(session,
+                    ContentLoaderJsonTest.class.getResourceAsStream("/SLING-INF/nodetypes/app.cnd"));
         } catch (IOException ex) {
             throw new RuntimeException("Unable to register sling node types.", ex);
         } catch (RepositoryException ex) {
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java
index 9d65816..cb89afb 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java
@@ -28,10 +28,7 @@ import org.apache.sling.commons.testing.jcr.RepositoryUtil;
 import org.apache.sling.testing.mock.sling.MockSling;
 import org.apache.sling.testing.mock.sling.ResourceResolverType;
 import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderJsonTest;
-import org.junit.Ignore;
 
-// TEST IS DISABLED currently, it does not work with jackrabbit repository yet
-@Ignore
 public class ContentLoaderJsonTest extends AbstractContentLoaderJsonTest {
 
     @Override
@@ -43,9 +40,12 @@ public class ContentLoaderJsonTest extends AbstractContentLoaderJsonTest {
     protected ResourceResolver newResourceResolver() {
         ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
 
-        // register sling node types
+        // register sling and app node types
         try {
-            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+            Session session = resolver.adaptTo(Session.class);
+            RepositoryUtil.registerSlingNodeTypes(session);
+            RepositoryUtil.registerNodeType(session,
+                    ContentLoaderJsonTest.class.getResourceAsStream("/SLING-INF/nodetypes/app.cnd"));
         } catch (IOException ex) {
             throw new RuntimeException("Unable to register sling node types.", ex);
         } catch (RepositoryException ex) {
diff --git a/src/test/resources/SLING-INF/nodetypes/app.cnd b/src/test/resources/SLING-INF/nodetypes/app.cnd
new file mode 100644
index 0000000..e09d831
--- /dev/null
+++ b/src/test/resources/SLING-INF/nodetypes/app.cnd
@@ -0,0 +1,8 @@
+<app='http://example.com/jcr/app/1.0'>
+<dam='http://example.com/jcr/dam/1.0'>
+
+[app:Page] > nt:unstructured
+[app:PageContent] > nt:unstructured
+
+[dam:Asset] > nt:unstructured
+[dam:AssetContent] > nt:unstructured

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

[sling-org-apache-sling-testing-sling-mock] 10/20: [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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit f7e1c172a5f888df74784123d775f930e731043e
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:24:01 2014 +0000

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

diff --git a/pom.xml b/pom.xml
index 3f23938..97b73ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
-    <version>0.1.0</version>
+    <version>0.1.1-SNAPSHOT</version>
     <packaging>jar</packaging>
   
     <name>Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver</name>
@@ -39,9 +39,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.0</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock-jackrabbit</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-sling-mock] 02/20: remove exclusion no longer required

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit a192d3108ce14893a2d53a75f4f69b40a08f37e5
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Oct 13 12:55:32 2014 +0000

    remove exclusion no longer required
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/sling-mock-jackrabbit@1631372 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/pom.xml b/pom.xml
index e3bbe73..7d5ef12 100644
--- a/pom.xml
+++ b/pom.xml
@@ -61,10 +61,6 @@
             <version>2.0.16</version>
             <exclusions>
                 <exclusion>
-                    <groupId>org.slf4j</groupId>
-                    <artifactId>slf4j-simple</artifactId>
-                </exclusion>
-                <exclusion>
                     <groupId>org.jmock</groupId>
                     <artifactId>jmock-junit4</artifactId>
                 </exclusion>

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

[sling-org-apache-sling-testing-sling-mock] 16/20: SLING-4267 update to latest sling-mock snapshot

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 2424eb2fd5b389de9a7c9ad7fad3edfec3b2c2b3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Jan 14 11:50:08 2015 +0000

    SLING-4267 update to latest sling-mock snapshot
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1651626 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index c5c4553..0160a30 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <version>1.1.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <version>1.1.1-SNAPSHOT</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 19/20: [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-jackrabbit-0.1.2

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 3a4968e9e602151f64e9582456ea3bf44b66f627
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jan 22 20:53:35 2015 +0000

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

diff --git a/pom.xml b/pom.xml
index e1d6df2..df1e0fd 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
-    <version>0.1.1-SNAPSHOT</version>
+    <version>0.1.2</version>
     <packaging>bundle</packaging>
   
     <name>Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver</name>
@@ -39,9 +39,9 @@
     </properties>
 
     <scm>
-        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</connection>
-        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</developerConnection>
-        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock-jackrabbit</url>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.2</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.2</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-jackrabbit-0.1.2</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-sling-mock] 18/20: update dependencies to released versions

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 8564260b2ecd0b5de933c826581db9b5ecd75fb8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Jan 22 20:52:29 2015 +0000

    update dependencies to released versions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1654058 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 0160a30..e1d6df2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.1.1-SNAPSHOT</version>
+            <version>1.1.2</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.1.1-SNAPSHOT</version>
+            <version>1.1.2</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 14/20: SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 77e2322c857b89b8cc3b895de19118fbac000473
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Oct 22 20:40:31 2014 +0000

    SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1633717 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 40 +++++++++++++++++++++-
 .../mock/sling/jackrabbit/package-info.java        | 23 +++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/pom.xml b/pom.xml
index 97b73ff..b0b168b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -29,7 +29,7 @@
 
     <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
     <version>0.1.1-SNAPSHOT</version>
-    <packaging>jar</packaging>
+    <packaging>bundle</packaging>
   
     <name>Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver</name>
     <description>Implements a resource resolver type for Jackrabbit that can be used in unit tests based on Sling Mocks.</description>
@@ -94,4 +94,42 @@
   
     </dependencies>
   
+    <build>
+        <plugins>
+    
+          <!-- Publish test artifact -->
+          <plugin>
+            <groupId>org.apache.maven.plugins</groupId>
+            <artifactId>maven-jar-plugin</artifactId>
+            <executions>
+              <execution>
+                <goals>
+                  <goal>test-jar</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+    
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-bundle-plugin</artifactId>
+            <extensions>true</extensions>
+          </plugin>
+    
+          <plugin>
+            <groupId>org.apache.felix</groupId>
+            <artifactId>maven-scr-plugin</artifactId>
+            <executions>
+              <execution>
+                <id>generate-scr-scrdescriptor</id>
+                <goals>
+                  <goal>scr</goal>
+                </goals>
+              </execution>
+            </executions>
+          </plugin>
+    
+        </plugins>
+    </build>
+  
 </project>
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/package-info.java b/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/package-info.java
new file mode 100644
index 0000000..e22b13e
--- /dev/null
+++ b/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/package-info.java
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+/**
+ * Sling Mock Jackrabbit-based Resource Resolver
+ */
+@aQute.bnd.annotation.Version("0.1")
+package org.apache.sling.testing.mock.sling.jackrabbit;

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

[sling-org-apache-sling-testing-sling-mock] 12/20: update README

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 62c020e0f1a8c26cc80879a58a406cf2b5dbc59b
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:26:24 2014 +0000

    update README
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632511 13f79535-47bb-0310-9956-ffa450edef68
---
 README.txt | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/README.txt b/README.txt
index ade92f2..5379fdb 100644
--- a/README.txt
+++ b/README.txt
@@ -4,5 +4,8 @@ Implements a resource resolver type for Jackrabbit that can be used in unit test
 
 This is a separate maven artifacts because it introduces a lot of further dependencies.
 
+Please note: This adapter for Jackrabbit is still experimental, not all sling-mock features are working.
+(see disabled unit tests with comments)
+
 Documentation:
 http://sling.apache.org/documentation/development/sling-mock.html

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

[sling-org-apache-sling-testing-sling-mock] 15/20: SLING-4108 default to getAdministrativeResourceResolver in sling-mock to support jackrabbit resource resolver adapter as well

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 626a8a9b2a25ef07e758ae65113911f2ed3d222a
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Dec 9 13:14:58 2014 +0000

    SLING-4108 default to getAdministrativeResourceResolver in sling-mock to support jackrabbit resource resolver adapter as well
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1644043 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index b0b168b..c5c4553 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0</version>
+            <version>1.0.1-SNAPSHOT</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 13/20: set to released version now available on maven central

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit bbfca8c94e9f0abf30ac71cd63ca439299e86897
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Wed Oct 22 19:33:51 2014 +0000

    set to released version now available on maven central
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1633690 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index e8606d4..97b73ff 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.1-SNAPSHOT</version>
+            <version>1.0.0</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 03/20: svn:ignore

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit b88c7595fdfa75a2a7748763a4dfdc733523b3fc
Author: Bertrand Delacretaz <bd...@apache.org>
AuthorDate: Mon Oct 13 13:23:53 2014 +0000

    svn:ignore
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/sling-mock-jackrabbit@1631387 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-sling-mock] 08/20: update to released versions

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit cfa692fe22f9ee37f513d85b536ba8fde0fb09f8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:23:24 2014 +0000

    update to released versions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632506 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pom.xml b/pom.xml
index 8af38db..24292a7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -49,14 +49,14 @@
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0.0</version>
             <scope>compile</scope>
         </dependency>
     
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.testing.sling-mock</artifactId>
-            <version>1.0.0-SNAPSHOT</version>
+            <version>1.0.0</version>
             <classifier>tests</classifier>
             <scope>test</scope>
         </dependency>

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

[sling-org-apache-sling-testing-sling-mock] 04/20: SLING-4042 move all mock projects to mocks/ subdirectory

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit b5561082a07d98bfa0e47726564042a4139772ef
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Oct 13 14:32:45 2014 +0000

    SLING-4042 move all mock projects to mocks/ subdirectory
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1631416 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-sling-mock] 07/20: add/update SCM urls

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 29ec23911f72a2e4dc4753a03218c9126db18f2d
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Oct 17 08:10:43 2014 +0000

    add/update SCM urls
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632490 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/pom.xml b/pom.xml
index 7d5ef12..8af38db 100644
--- a/pom.xml
+++ b/pom.xml
@@ -38,6 +38,12 @@
         <sling.java.version>6</sling.java.version>
     </properties>
 
+    <scm>
+        <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</connection>
+        <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit</developerConnection>
+        <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock-jackrabbit</url>
+    </scm>
+
     <dependencies>
   
         <dependency>

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

[sling-org-apache-sling-testing-sling-mock] 01/20: SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 8230617d59189a92fc873a587db39eac74d6eb3d
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Oct 13 11:54:39 2014 +0000

    SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/sling-mock-jackrabbit@1631356 13f79535-47bb-0310-9956-ffa450edef68
---
 pom.xml                                            | 95 ++++++++++++++++++++++
 .../JackrabbitMockResourceResolverAdapter.java     | 47 +++++++++++
 .../contentimport/ContentLoaderBinaryTest.java     | 55 +++++++++++++
 .../contentimport/ContentLoaderJsonDamTest.java    | 58 +++++++++++++
 .../contentimport/ContentLoaderJsonTest.java       | 58 +++++++++++++
 .../resource/JcrResourceResolverTest.java          | 55 +++++++++++++
 .../resource/SlingCrudResourceResolverTest.java    | 55 +++++++++++++
 7 files changed, 423 insertions(+)

diff --git a/pom.xml b/pom.xml
new file mode 100644
index 0000000..e3bbe73
--- /dev/null
+++ b/pom.xml
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!--
+  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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.sling</groupId>
+        <artifactId>sling</artifactId>
+        <version>22</version>
+        <relativePath>../../../parent/pom.xml</relativePath>
+    </parent>
+
+    <artifactId>org.apache.sling.testing.sling-mock-jackrabbit</artifactId>
+    <version>1.0.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
+  
+    <name>Apache Sling Testing Sling Mock Jackrabbit-based Resource Resolver</name>
+    <description>Implements a resource resolver type for Jackrabbit that can be used in unit tests based on Sling Mocks.</description>
+  
+    <properties>
+        <sling.java.version>6</sling.java.version>
+    </properties>
+
+    <dependencies>
+  
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.testing.sling-mock</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <scope>compile</scope>
+        </dependency>
+    
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.testing.sling-mock</artifactId>
+            <version>1.0.0-SNAPSHOT</version>
+            <classifier>tests</classifier>
+            <scope>test</scope>
+        </dependency>
+  
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.commons.testing</artifactId>
+            <version>2.0.16</version>
+            <exclusions>
+                <exclusion>
+                    <groupId>org.slf4j</groupId>
+                    <artifactId>slf4j-simple</artifactId>
+                </exclusion>
+                <exclusion>
+                    <groupId>org.jmock</groupId>
+                    <artifactId>jmock-junit4</artifactId>
+                </exclusion>
+            </exclusions>
+        </dependency>
+    
+        <dependency>
+            <groupId>javax.jcr</groupId>
+            <artifactId>jcr</artifactId>
+            <version>2.0</version>
+            <scope>compile</scope>
+        </dependency>
+
+        <dependency>
+            <groupId>org.mockito</groupId>
+            <artifactId>mockito-all</artifactId>
+            <version>1.9.5</version>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+  
+    </dependencies>
+  
+</project>
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/JackrabbitMockResourceResolverAdapter.java b/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/JackrabbitMockResourceResolverAdapter.java
new file mode 100644
index 0000000..601a36c
--- /dev/null
+++ b/src/main/java/org/apache/sling/testing/mock/sling/jackrabbit/JackrabbitMockResourceResolverAdapter.java
@@ -0,0 +1,47 @@
+/*
+ * 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.sling.jackrabbit;
+
+import javax.jcr.RepositoryException;
+
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.commons.testing.jcr.RepositoryProvider;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.testing.mock.sling.spi.ResourceResolverTypeAdapter;
+
+/**
+ * Resource resolver type adapter for Jackrabbit repository.
+ */
+public class JackrabbitMockResourceResolverAdapter implements ResourceResolverTypeAdapter {
+
+    @Override
+    public ResourceResolverFactory newResourceResolverFactory() {
+        return null;
+    }
+
+    @Override
+    public SlingRepository newSlingRepository() {
+        try {
+            return RepositoryProvider.instance().getRepository();
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to get jackrabbit SlingRepository instance.", ex);
+        }
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderBinaryTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderBinaryTest.java
new file mode 100644
index 0000000..854209d
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderBinaryTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.sling.jackrabbit.contentimport;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderBinaryTest;
+
+public class ContentLoaderBinaryTest extends AbstractContentLoaderBinaryTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolver newResourceResolver() {
+        ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
+
+        // register sling node types
+        try {
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return resolver;
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java
new file mode 100644
index 0000000..b3ee20a
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonDamTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sling.jackrabbit.contentimport;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderJsonDamTest;
+import org.junit.Ignore;
+
+//TEST IS DISABLED currently, it does not work with jackrabbit repository yet
+@Ignore
+public class ContentLoaderJsonDamTest extends AbstractContentLoaderJsonDamTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolver newResourceResolver() {
+        ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
+
+        // register sling node types
+        try {
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return resolver;
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java
new file mode 100644
index 0000000..9d65816
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/contentimport/ContentLoaderJsonTest.java
@@ -0,0 +1,58 @@
+/*
+ * 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.sling.jackrabbit.contentimport;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.loader.AbstractContentLoaderJsonTest;
+import org.junit.Ignore;
+
+// TEST IS DISABLED currently, it does not work with jackrabbit repository yet
+@Ignore
+public class ContentLoaderJsonTest extends AbstractContentLoaderJsonTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolver newResourceResolver() {
+        ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
+
+        // register sling node types
+        try {
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return resolver;
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/JcrResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/JcrResourceResolverTest.java
new file mode 100644
index 0000000..eaf27cb
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/JcrResourceResolverTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.sling.jackrabbit.resource;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.resource.AbstractJcrResourceResolverTest;
+
+public class JcrResourceResolverTest extends AbstractJcrResourceResolverTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolver newResourceResolver() {
+        ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
+
+        // register sling node types
+        try {
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return resolver;
+    }
+
+}
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/SlingCrudResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/SlingCrudResourceResolverTest.java
new file mode 100644
index 0000000..6a27396
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/SlingCrudResourceResolverTest.java
@@ -0,0 +1,55 @@
+/*
+ * 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.sling.jackrabbit.resource;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.resource.AbstractSlingCrudResourceResolverTest;
+
+public class SlingCrudResourceResolverTest extends AbstractSlingCrudResourceResolverTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolver newResourceResolver() {
+        ResourceResolver resolver = MockSling.newResourceResolver(getResourceResolverType());
+
+        // register sling node types
+        try {
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return resolver;
+    }
+
+}

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

[sling-org-apache-sling-testing-sling-mock] 05/20: SLING-4042 make sure JCR mock supports accessing data using multiple sessions

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.sling-mock-jackrabbit-0.1.2
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 3e38f031c0747ee0adde1c680124a0b6b35940f8
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Thu Oct 16 17:53:47 2014 +0000

    SLING-4042 make sure JCR mock supports accessing data using multiple sessions
    
    git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock-jackrabbit@1632397 13f79535-47bb-0310-9956-ffa450edef68
---
 .../resource/MultipleResourceResolverTest.java     | 63 ++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/MultipleResourceResolverTest.java b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/MultipleResourceResolverTest.java
new file mode 100644
index 0000000..82eeaae
--- /dev/null
+++ b/src/test/java/org/apache/sling/testing/mock/sling/jackrabbit/resource/MultipleResourceResolverTest.java
@@ -0,0 +1,63 @@
+/*
+ * 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.sling.jackrabbit.resource;
+
+import java.io.IOException;
+
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.api.resource.LoginException;
+import org.apache.sling.api.resource.ResourceResolver;
+import org.apache.sling.api.resource.ResourceResolverFactory;
+import org.apache.sling.commons.testing.jcr.RepositoryUtil;
+import org.apache.sling.testing.mock.sling.MockSling;
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+import org.apache.sling.testing.mock.sling.resource.AbstractMultipleResourceResolverTest;
+import org.junit.Ignore;
+
+//TEST IS DISABLED currently, it does not work with jackrabbit repository yet
+@Ignore
+public class MultipleResourceResolverTest extends AbstractMultipleResourceResolverTest {
+
+    @Override
+    protected ResourceResolverType getResourceResolverType() {
+        return ResourceResolverType.JCR_JACKRABBIT;
+    }
+
+    @Override
+    protected ResourceResolverFactory newResourceResolerFactory() {
+        ResourceResolverFactory factory = MockSling.newResourceResolverFactory(getResourceResolverType());
+
+        // register sling node types
+        try {
+            ResourceResolver resolver = factory.getResourceResolver(null);
+            RepositoryUtil.registerSlingNodeTypes(resolver.adaptTo(Session.class));
+        } catch (LoginException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (IOException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        } catch (RepositoryException ex) {
+            throw new RuntimeException("Unable to register sling node types.", ex);
+        }
+
+        return factory;
+    }
+
+}

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