You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ss...@apache.org on 2022/08/18 11:34:15 UTC

[sling-org-apache-sling-testing-sling-mock] branch feature/SLING-11455-resource-provider created (now 8e56c5e)

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

sseifert pushed a change to branch feature/SLING-11455-resource-provider
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git


      at 8e56c5e  SLING-11455 use ResourceProvider implementation from resourceresolver-mock

This branch includes the following new commits:

     new 602e666  Merge remote-tracking branch 'origin/SLING-10937-unwrapped-adaptable-in-sling-model' into feature/SLING-11455-resource-provider
     new 8e56c5e  SLING-11455 use ResourceProvider implementation from resourceresolver-mock

The 2 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.



[sling-org-apache-sling-testing-sling-mock] 02/02: SLING-11455 use ResourceProvider implementation from resourceresolver-mock

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

sseifert pushed a commit to branch feature/SLING-11455-resource-provider
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 8e56c5eb4b2b384d9b763a7650c24eef3eded9f9
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Aug 18 13:33:59 2022 +0200

    SLING-11455 use ResourceProvider implementation from resourceresolver-mock
---
 .../mock/sling/RRMockMockResourceResolverAdapter.java      | 14 +++++---------
 parent/pom.xml                                             |  2 +-
 2 files changed, 6 insertions(+), 10 deletions(-)

diff --git a/core/src/main/java/org/apache/sling/testing/mock/sling/RRMockMockResourceResolverAdapter.java b/core/src/main/java/org/apache/sling/testing/mock/sling/RRMockMockResourceResolverAdapter.java
index ccb2c2e..3108609 100644
--- a/core/src/main/java/org/apache/sling/testing/mock/sling/RRMockMockResourceResolverAdapter.java
+++ b/core/src/main/java/org/apache/sling/testing/mock/sling/RRMockMockResourceResolverAdapter.java
@@ -20,9 +20,9 @@ package org.apache.sling.testing.mock.sling;
 
 import org.apache.sling.api.resource.ResourceResolverFactory;
 import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.testing.mock.osgi.MockOsgi;
 import org.apache.sling.testing.mock.sling.spi.ResourceResolverTypeAdapter;
-import org.apache.sling.testing.resourceresolver.MockResourceResolverFactory;
-import org.apache.sling.testing.resourceresolver.MockResourceResolverFactoryOptions;
+import org.apache.sling.testing.resourceresolver.MockResourceProvider;
 import org.osgi.framework.BundleContext;
 
 /**
@@ -30,21 +30,17 @@ import org.osgi.framework.BundleContext;
  */
 class RRMockMockResourceResolverAdapter implements ResourceResolverTypeAdapter {
 
-    private final MockResourceResolverFactoryOptions options;
-    private final BundleContext bundleContext;
-
     /**
      * Constructor
      */
     public RRMockMockResourceResolverAdapter(BundleContext bundleContext) {
-        this.options = new MockResourceResolverFactoryOptions();
-        this.options.setMangleNamespacePrefixes(true);
-        this.bundleContext = bundleContext;
+        // register resource provider from resourceresolver-mock and use Sling ResourceResolver implementation
+        MockOsgi.registerInjectActivateService(MockResourceProvider.class, bundleContext);
     }
 
     @Override
     public ResourceResolverFactory newResourceResolverFactory() {
-        return new RRMockResourceResolverFactoryWrapper(new MockResourceResolverFactory(options), bundleContext);
+        return null;
     }
 
     @Override
diff --git a/parent/pom.xml b/parent/pom.xml
index ceab26a..e4df0ef 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -37,7 +37,7 @@
     <properties>
         <osgi-mock.version>3.3.0</osgi-mock.version>
         <jcr-mock.version>1.6.0</jcr-mock.version>
-        <resourceresolver-mock.version>1.3.0</resourceresolver-mock.version>
+        <resourceresolver-mock.version>1.4.0-SNAPSHOT</resourceresolver-mock.version>
         <logging-mock.version>2.0.0</logging-mock.version>
         <servlet-helpers.version>1.4.2</servlet-helpers.version>
         <resourcebuilder.version>1.0.4</resourcebuilder.version>


[sling-org-apache-sling-testing-sling-mock] 01/02: Merge remote-tracking branch 'origin/SLING-10937-unwrapped-adaptable-in-sling-model' into feature/SLING-11455-resource-provider

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

sseifert pushed a commit to branch feature/SLING-11455-resource-provider
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git

commit 602e66634aa151fafbd7ac87b116db40ce5f58a0
Merge: fe1679e ce0349c
Author: Stefan Seifert <st...@users.noreply.github.com>
AuthorDate: Thu Aug 18 13:22:39 2022 +0200

    Merge remote-tracking branch 'origin/SLING-10937-unwrapped-adaptable-in-sling-model' into feature/SLING-11455-resource-provider

 .../mock/sling/context/models/ResourceModel.java   | 37 ++++++++++++++++++++++
 .../AbstractSlingCrudResourceResolverTest.java     | 10 ++++++
 2 files changed, 47 insertions(+)