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:24:09 UTC
[sling-org-apache-sling-testing-sling-mock] annotated tag
org.apache.sling.testing.sling-mock-1.7.0 created (now 86e542e)
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git.
at 86e542e (tag)
tagging 51a437197e27a3d8602739aac3afcb62b3429ac3 (commit)
by Stefan Seifert
on Tue Jul 12 10:27:12 2016 +0000
- Log -----------------------------------------------------------------
org.apache.sling.testing.sling-mock-1.7.0
-----------------------------------------------------------------------
This annotated tag includes the following new commits:
new 2aa4712 SLING-4042 Donate sling-mock, jcr-mock, osgi-mock implementation
new d63d89c svn:ignore
new a6e7c1a SLING-4042 move all mock projects to mocks/ subdirectory
new d1f839a SLING-4042 add missing package-info files
new e9e968a SLING-4042 per default no charencoding should be set in mock response
new 43eb350 SLING-4042 do not forget to register ResourceResolverFactory in OSGi context as well
new 3d36daf SLING-4042 make sure JCR mock supports accessing data using multiple sessions
new 4fc4baf SLING-4042 add README files
new 4aa90b9 add/update SCM urls
new 22c8024 update to released versions
new 1ba5459 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.0.0
new 5dcb3d7 [maven-release-plugin] prepare for next development iteration
new 5b0b3fe update dependencies in release process to next snapshot version
new 1f52235 SLING-4085 NPE when using SlingContext rule without constructor argument
new 9442dd8 SLING-4086 SlingHttpServlerRequest should support getResourceBundle() methods
new 2f5faf4 set to released version now available on maven central
new 6964d49 SLING-4090 Define package versions for Sling Mock, JCR Mock, OSGi Mock
new 448fe45 SLING-4108 JCR/Sling/ResourceResolver Mock: Support providing authentication info
new 5b4c01c fix some javadoc errors and warnings
new cb5f237 SLING-4162 Introduce "OsgiContext" junit rule for OSGi and OsgiContextImpl
new e72ad4b SLING-4229 add test cases for deep path access support in sling-mock as well
new a07abf8 SLING-4108 default to getAdministrativeResourceResolver in sling-mock to support jackrabbit resource resolver adapter as well
new 3cbedc6 fix some javadoc errors/warnings
new 47cc45e update to released versions
new fccd947 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.1.0
new 4b72ed2 [maven-release-plugin] prepare for next development iteration
new 85cdaa4 update to next snapshot version until releases available in maven central
new 2de8a96 SLING-4266 - SlingContext always uses the default resourceResolverType
new 0a167f6 SLING-4268 - ContentLoader should not try to import ACLs
new 9ee66c6 SLING-4269 - SlingContextImpl's resource resolver should be an administrative one
new 6f6321b switch back to released versions for dependencies
new a969262 SLING-4267 add some more property names to be ignored on import because they are managed by JCR internally
new 62e7e2a SLING-4267 support importing nt:resource noded in jackrabbit with empty binary data enable content loader unit tests in sling-mock-jackrabbit
new 6569ce2 assertions can be activated now after updating to latest mock dependencies
new b816e47 SLING-4267 support importing nt:resource nodes in jackrabbit with empty binary data
new 32c3978 update dependencies to released versions
new c05aeae [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.1.2
new e57b7e1 [maven-release-plugin] prepare for next development iteration
new d9fcb59 update to next development snapshot unit released artifacts are in maven central
new c0e8f71 switch back to released versions now available in maven central
new e8d2807 SLING-4362 make sure JCR namespaces are correctly registered in JCR mock on initialization through sling mock
new 90ddb94 SLING-4376 ResourceResolver.resolve(null) should resolve to root resource
new c49b0e1 SLING-4394 Sling Mock with JCR-based Resource Resolver: Support default search paths
new 5e1c2d6 SLING-848 Support getting versioned resources by using uri path parameters
new 4e72c06 Use the recent resourceresolver SNAPSHOT in sling-mock
new eb9da99 SLING-848 revert updating sling api/resource resolver/jcr resource dependenciens - using sling mock in a project should not enforce using the latest version of those keep adding of getThreadResourceResolver() method, but throw UnsupportedOperationException
new 2259bfe SLING-4431 Sling Mocks: Remove Dependency on ResourceResolverInjector
new 74de88f cosmetic code formatting changes
new 9e35c02 SLING-4434 refactor integration with sling models: remove MockModelAdapterFactory and directly integrate the original ModelAdapterFactory using the new osgi mock dynamic service reference feature
new 71bbb5c SLING-4437 MockJcrResourceResolverFactory should allow to register services dynamically
new fc5346f SLING-4433 use real AdapterManagerImpl implementation with support for ADAPTER_CLASSES/ADAPTABLE_CLASSES
new a4d3ac9 SLING-4433 remove dependency to org.apache.sling.adapter and inline helper classes instead
new 58f81ee update to release versions
new ac35a62 update package version
new 29e7fda [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.2.0
new f96f34a [maven-release-plugin] prepare for next development iteration
new 93110e5 remove service description and vendor for this mock service - makes problems with baseline check
new f187b33 remove service description and vendor for this mock service - makes problems with baseline check
new 1b68139 update to next development snapshot unit released artifacts are in maven central
new 53be964 switch to released versions
new 34954fa SLING-4522 Sling Mocks: ContentLoader fails for UTF8 encoded json files on Windows Systems
new 75d379a Fix scr xml parsing when updating to new scr plugin by using fix for SLING-4670
new b0f4a0a SLING-4698 - Set parent.relativePath to empty for all modules
new 28f1b00 SLING-4654 Support ResourceResolver.findResources with JCR_MOCK
new 6728203 SLING-4721 sling-mock: Fully support ResourceResolverFactoryActivator for jcr-mock
new 8a9b3c4 SLING-4729 Sling Mock: Add "NONE" resource resolver type
new 5d2ffa2 SLING-4470 introduce separate "logging-mock" project for default log configuration in mock tests, remove compile-dependency on slf4j-simple
new 192936d update dependencies for release
new ab204bb update dependencies for release
new 5482f51 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.3.0
new 7baf341 [maven-release-plugin] prepare for next development iteration
new 9a0fa2b update to next development snapshot unit released artifacts are in maven central
new bb58061 SLING-4605 - Add support for an Oak resource resolver type mock
new 3601bfd Mocks: use latest snapshots
new b6207fb SLING-4605 - Add support for an Oak resource resolver type mock
new bac4c7f update to released mock versions
new 37c868a SLING-4756 add support for filtering via felix.framework FilterImpl implementation
new 546986a SLING-4605 javadoc updates and add initializing for ContextResourceResolverFactory
new 6e3e339 Minor wording fixes when the ResourceResolverTypeAdapter can't be found.
new f4c6d5d SLING-4775 - MockSlingSettingService shoud support getSlingId()
new 7a57b01 SLING-4775 move the now supported method out of the "unsupported operations" block
new e0cc675 SLING-4773 ensure sling namespace is always registered when using JCR_MOCK resource resolver adapter
new d39a8a6 update to released versions
new 54d3fe0 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.4.0
new 8913f6c [maven-release-plugin] prepare for next development iteration
new 37fa126 update to latest development snapshots
new df31839 Update to Sling Parent 23
new e497760 Testing: remove superflous sling.java.version=6 as it's the default now
new d8691fa switch to released versions
new a3f2ae9 set parent version to 24 and add empty relativePath where missing
new 05758ef SLING-4932, make compatible with o.a.s.jcr.resource 2.5 (requires also an upgrade to Sling API 2.9)
new 169f6e0 SLING-4932 switch back to old api/jcr.resource versions and ensure compatibility by initiating PathMapper service by reflection if it exists
new 9ab5f09 SLING-4938 exclude optional transitive dependencies of reflections
new 347ce2a SLING-4990 Support HttpSession invalidate, new, lastAccessedTime, maxInteractiveInterval
new 602f4a9 SLING-4993 Support RequestParameter in MockSlingHttpServlerRequest
new ec0efee SLING-4994 Support InputStream, ContentLenght, ContentType and CharacterEncoding in Request
new 489ae34 SLING-4998 ResponseBodySupport - use default charset if no response charset is set
new 9832809 cosmetic: beautify error messages when setup/teardown fails
new da53509 SLING-5002 - [sling-mock] Update dependency version of org.reflections
new 3fafd8e SLING-5003 Support request dispatcher in MockSlingHttpServletRequest
new b4037bf SLING-5002 switch back to 0.9.9 due to threading issues in 0.9.10 when running junit tests in parallel
new e52575e update other mocks to latest releases
new 2a934a4 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.5.0
new 8f19c45 [maven-release-plugin] prepare for next development iteration
new d58abbe switch to latest snapshot version until release is available in maven central
new 07c6650 SLING-5007 add unit test to explicitly test root path child listing in sling-mock as well
new d5ebb42 SLING-5007 realx unit test to test root path child listing in sling-mock-jackrabbit and sling-mock-jackrabbit and sling-mock-oak because in real repositories multiple root test nodes may be created in parallel, or nodes already exist
new 8580a55 update release versions
new 5846795 update to next snapshot version until releases are available in maven central
new f960880 SLING-5007 use same unit tests for root node tests for all resource resolver types without counting the number of children.
new 0ac864b switch back to released version
new add520f SLING-5042 ResourceResolver.commit() does not call session.save() on the backing JCR Session
new 8123868 SLING-5043 sling-mocks: Execute commit() after ContentLoader operations
new c1ce2e6 SLING-5057 - Support HttpServletRequest#getRemoteUser
new b10d3bb SLING-5057 - Support HttpServletRequest#getRemoteUser
new 53bfbe5 SLING-5064 sling-mock: Register JCR node types for OSGi bundles in class path
new 853e02b SLING-5064 sling-mock: Register JCR node types for OSGi bundles in class path
new c7551b3 cosmetic: fix log message
new 317bf58 SLING-5066 sling-mock: Close ResourceResolver on JUnit test tearDown
new f008644 SLING-5064 sling-mock: Register JCR node types for OSGi bundles in class path
new 8c79b81 SLING-5067 sling-mock: "uniqueRoot()" to simplify creation and cleanup of unique root paths in repository
new b24a116 SLING-5067 rewrite unit tests to use new "uniqueRoot" feature
new 3c296a7 SLING-5064 manual registration of node types no longer required; register namespaces and node types centrally depending on NodeTypeMode
new d795bcc SLING-5067 fix cleanup issue with "uniqueRoot" feature
new d74181d SLING-5086 sling-mock: Add SlingContext.registerAdapter convenience method
new fd0b260 SLING-5086 sling-mock: Add SlingContext.registerAdapter convenience method
new cf03565 cosmetic: eliminate some javadoc warnings
new 5c7c77d SLING-5088 update to latest osgi-mock to make sure all services are deactivated properly
new 856784c SLING-5088 refactor unit test to make sure resource resolver and bundle contexts are properly shutdown
new b90bd44 SLING-5088 refactor resource resolver initialization
new 81f87d0 SLING-5088 rewrite setup code for resource resolver factory
new 1b9e8db SLING-5088 deprecate all methods that may lead to thread leaks
new 8801d99 SLING-5088 control SlingRepository resources via activate/deactivate methods; make sure all oak ExecutorServices are shutdown properly
new c1525db cosmetic: fix javadoc errors
new 47f0035 SLING-5088 avoid registering ResourceResolverFactory twice
new 21a5c64 SLING-5088 register default service user mapping for mock bundle
new 2b7ac22 Update the main reactor to parent 25
new 1089980 update dependency
new 8949c00 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.6.0
new 90239a1 [maven-release-plugin] prepare for next development iteration
new 9f9253b set dependencies to next snapshot version until released versions are available in maven central
new 7ac242f switch back to released versions of dependency
new 1f318cf SLING-5197 sling-mock: Do not override ResourceResolverFactoryActivator's default values
new f7609c8 SLING-5197 sling-mock: Do not override ResourceResolverFactoryActivator's default values
new d444456 update to latest osgi-mock version
new dd7948a SLING-5339 sling-mock: Support remote add, remote host and remote port in MockSlingHttpSevletRequest
new a52790b SLING-5392 sling-mock: Use javax.servlet-api dependency instead of mortbay version
new 3234a24 Switch to parent pom 26
new dfd873c SLING-5428 Move MockSlingHttpServletRequest+Response to org.apache.sling.servlet-helpers
new e7cd297 update mock dependencies to latest versions
new 0186990 fix javadoc errors
new 64a8b38 [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.6.2
new a56450f [maven-release-plugin] prepare for next development iteration
new 37d2b26 update to next snapshot dependency until released artifacts are available in maven central
new e39da4c update to released versions
new 7335608 1.x maintenance branch
new 0ac29f6 update branch url
new 780dae1 SLING-5551 MockSlingHttpServletRequest: make sure given bundleContext is used
new 1d3a77f SLING-5552 ModelAdapterFactoryUtil: Suppress info log messages from Reflections library
new 16788a7 SLING-5770 add support for custom resource resolver factory activator configuration via SlingContextBuilder add support for additional callbacks before setup and after teardown
new 9c111ba SLING-5770 update javadoc
new 117debd update dependencies to released versions
new 124d98e [maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.7.0
new 51a4371 [maven-release-plugin] copy for tag org.apache.sling.testing.sling-mock-1.7.0
The 164 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] 08/12: SLING-5770 add
support for custom resource resolver factory activator configuration via
SlingContextBuilder add support for additional callbacks before setup and
after teardown
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 16788a7d9ddcced9be959b4c949adf0499f70090
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jul 8 15:45:23 2016 +0000
SLING-5770 add support for custom resource resolver factory activator configuration via SlingContextBuilder
add support for additional callbacks before setup and after teardown
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1751928 13f79535-47bb-0310-9956-ffa450edef68
---
.../mock/sling/context/SlingContextImpl.java | 44 +++++++-
.../testing/mock/sling/context/package-info.java | 2 +-
.../testing/mock/sling/junit/SlingContext.java | 111 +++++++++++++-------
.../mock/sling/junit/SlingContextBuilder.java | 115 +++++++++++++++++++++
.../testing/mock/sling/junit/package-info.java | 2 +-
.../testing/mock/sling/junit/SlingContextTest.java | 43 +++++++-
6 files changed, 269 insertions(+), 48 deletions(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java b/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
index c1be12f..d29f2f7 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/SlingContextImpl.java
@@ -18,6 +18,10 @@
*/
package org.apache.sling.testing.mock.sling.context;
+import java.io.IOException;
+import java.util.Dictionary;
+import java.util.Hashtable;
+import java.util.Map;
import java.util.Set;
import javax.jcr.RepositoryException;
@@ -54,13 +58,17 @@ import org.apache.sling.testing.mock.sling.servlet.MockRequestPathInfo;
import org.apache.sling.testing.mock.sling.servlet.MockSlingHttpServletRequest;
import org.apache.sling.testing.mock.sling.servlet.MockSlingHttpServletResponse;
import org.osgi.framework.ServiceReference;
-
-import aQute.bnd.annotation.ConsumerType;
+import org.osgi.service.cm.Configuration;
+import org.osgi.service.cm.ConfigurationAdmin;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
import com.google.common.base.Function;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
+import aQute.bnd.annotation.ConsumerType;
+
/**
* Defines Sling context objects with lazy initialization. Should not be used
* directly but via the {@link org.apache.sling.testing.mock.sling.junit.SlingContext} JUnit
@@ -72,6 +80,10 @@ public class SlingContextImpl extends OsgiContextImpl {
// default to publish instance run mode
static final Set<String> DEFAULT_RUN_MODES = ImmutableSet.<String> builder().add("publish").build();
+ private static final String RESOURCERESOLVERFACTORYACTIVATOR_PID = "org.apache.sling.jcr.resource.internal.JcrResourceResolverFactoryImpl";
+
+ private static final Logger log = LoggerFactory.getLogger(SlingContextImpl.class);
+
protected ResourceResolverFactory resourceResolverFactory;
protected ResourceResolverType resourceResolverType;
protected ResourceResolver resourceResolver;
@@ -81,6 +93,8 @@ public class SlingContextImpl extends OsgiContextImpl {
protected ContentLoader contentLoader;
protected ContentBuilder contentBuilder;
protected UniqueRoot uniqueRoot;
+
+ private Map<String, Object> resourceResolverFactoryActivatorProps;
/**
* @param resourceResolverType Resource resolver type
@@ -89,12 +103,38 @@ public class SlingContextImpl extends OsgiContextImpl {
this.resourceResolverType = resourceResolverType;
}
+ protected void setResourceResolverFactoryActivatorProps(Map<String, Object> props) {
+ this.resourceResolverFactoryActivatorProps = props;
+ }
+
/**
* Setup actions before test method execution
*/
protected void setUp() {
super.setUp();
MockSling.setAdapterManagerBundleContext(bundleContext());
+
+ if (this.resourceResolverFactoryActivatorProps != null) {
+ // use OSGi ConfigurationAdmin to pass over customized configuration to Resource Resolver Factory Activator service
+ ConfigurationAdmin configAdmin = getService(ConfigurationAdmin.class);
+ if (configAdmin == null) {
+ log.warn("ConfigAdmin not found in osgi-mock context - please make sure osgi-mock 1.7.0 or higher is used.");
+ }
+ else {
+ try {
+ Configuration resourceResolverFactoryActivatorConfig = configAdmin.getConfiguration(RESOURCERESOLVERFACTORYACTIVATOR_PID);
+ Dictionary<String, Object> props = new Hashtable<String, Object>();
+ for (Map.Entry<String, Object> item : this.resourceResolverFactoryActivatorProps.entrySet()) {
+ props.put(item.getKey(), item.getValue());
+ }
+ resourceResolverFactoryActivatorConfig.update(props);
+ }
+ catch (IOException ex) {
+ throw new RuntimeException(ex);
+ }
+ }
+ }
+
this.resourceResolverFactory = newResourceResolverFactory();
registerDefaultServices();
}
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java b/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java
index 827160f..e440a9e 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/package-info.java
@@ -19,5 +19,5 @@
/**
* Sling context implementation for unit tests.
*/
-@aQute.bnd.annotation.Version("3.1")
+@aQute.bnd.annotation.Version("3.2")
package org.apache.sling.testing.mock.sling.context;
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
index 2b8381b..7f7625a 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
@@ -18,6 +18,8 @@
*/
package org.apache.sling.testing.mock.sling.junit;
+import java.util.Map;
+
import org.apache.sling.testing.mock.sling.ResourceResolverType;
import org.apache.sling.testing.mock.sling.context.SlingContextImpl;
import org.junit.rules.ExternalResource;
@@ -31,8 +33,10 @@ import org.junit.runners.model.Statement;
*/
public final class SlingContext extends SlingContextImpl implements TestRule {
- private final SlingContextCallback setUpCallback;
- private final SlingContextCallback tearDownCallback;
+ private final SlingContextCallback beforeSetUpCallback;
+ private final SlingContextCallback afterSetUpCallback;
+ private final SlingContextCallback beforeTearDownCallback;
+ private final SlingContextCallback afterTearDownCallback;
private final TestRule delegate;
/**
@@ -54,54 +58,61 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
/**
* Initialize Sling context with default resource resolver type:
* {@link org.apache.sling.testing.mock.sling.MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.
- * @param setUpCallback Allows the application to register an own callback
- * function that is called after the built-in setup rules are
- * executed.
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
*/
- public SlingContext(final SlingContextCallback setUpCallback) {
- this(setUpCallback, null, null);
+ public SlingContext(final SlingContextCallback afterSetUpCallback) {
+ this(afterSetUpCallback, null, null);
}
/**
* Initialize Sling context with resource resolver type.
- * @param setUpCallback Allows the application to register an own callback
- * function that is called after the built-in setup rules are
- * executed.
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
* @param resourceResolverType Resource resolver type.
*/
- public SlingContext(final SlingContextCallback setUpCallback, final ResourceResolverType resourceResolverType) {
- this(setUpCallback, null, resourceResolverType);
+ public SlingContext(final SlingContextCallback afterSetUpCallback, final ResourceResolverType resourceResolverType) {
+ this(afterSetUpCallback, null, resourceResolverType);
}
/**
* Initialize Sling context with default resource resolver type:
* {@link org.apache.sling.testing.mock.sling.MockSling#DEFAULT_RESOURCERESOLVER_TYPE}.
- * @param setUpCallback Allows the application to register an own callback
- * function that is called after the built-in setup rules are
- * executed.
- * @param tearDownCallback Allows the application to register an own
- * callback function that is called before the built-in teardown
- * rules are executed.
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
+ * @param beforeTearDownCallback Allows the application to register an own callback function that is called before the built-in teardown rules are executed.
+ */
+ public SlingContext(final SlingContextCallback afterSetUpCallback, final SlingContextCallback beforeTearDownCallback) {
+ this(afterSetUpCallback, beforeTearDownCallback, null);
+ }
+
+ /**
+ * Initialize Sling context with resource resolver type.
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
+ * @param beforeTearDownCallback Allows the application to register an own callback function that is called before the built-in teardown rules are executed.
+ * @param resourceResolverType Resource resolver type.
*/
- public SlingContext(final SlingContextCallback setUpCallback, final SlingContextCallback tearDownCallback) {
- this(setUpCallback, tearDownCallback, null);
+ public SlingContext(final SlingContextCallback afterSetUpCallback, final SlingContextCallback beforeTearDownCallback,
+ final ResourceResolverType resourceResolverType) {
+ this(null, afterSetUpCallback, beforeTearDownCallback, null, null, resourceResolverType);
}
/**
* Initialize Sling context with resource resolver type.
- * @param setUpCallback Allows the application to register an own callback
- * function that is called after the built-in setup rules are
- * executed.
- * @param tearDownCallback Allows the application to register an own
- * callback function that is called before the built-in teardown
- * rules are executed.
+ * @param beforeSetUpCallback Allows the application to register an own callback function that is called before the built-in setup rules are executed.
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
+ * @param beforeTearDownCallback Allows the application to register an own callback function that is called before the built-in teardown rules are executed.
+ * @param afterTearDownCallback Allows the application to register an own callback function that is after before the built-in teardown rules are executed.
+ * @param resourceResolverFactoryActivatorProps Allows to override OSGi configuration parameters for the Resource Resolver Factory Activator service.
* @param resourceResolverType Resource resolver type.
*/
- public SlingContext(final SlingContextCallback setUpCallback, final SlingContextCallback tearDownCallback,
+ SlingContext(final SlingContextCallback beforeSetUpCallback, final SlingContextCallback afterSetUpCallback,
+ final SlingContextCallback beforeTearDownCallback, final SlingContextCallback afterTearDownCallback,
+ final Map<String, Object> resourceResolverFactoryActivatorProps,
final ResourceResolverType resourceResolverType) {
- this.setUpCallback = setUpCallback;
- this.tearDownCallback = tearDownCallback;
+ this.beforeSetUpCallback = beforeSetUpCallback;
+ this.afterSetUpCallback = afterSetUpCallback;
+ this.beforeTearDownCallback = beforeTearDownCallback;
+ this.afterTearDownCallback = afterTearDownCallback;
+ setResourceResolverFactoryActivatorProps(resourceResolverFactoryActivatorProps);
// set resource resolver type in parent context
setResourceResolverType(resourceResolverType);
@@ -110,14 +121,16 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
this.delegate = new ExternalResource() {
@Override
protected void before() {
+ SlingContext.this.executeBeforeSetUpCallback();
SlingContext.this.setUp();
- SlingContext.this.executeSetUpCallback();
+ SlingContext.this.executeAfterSetUpCallback();
}
@Override
protected void after() {
- SlingContext.this.executeTearDownCallback();
+ SlingContext.this.executeBeforeTearDownCallback();
SlingContext.this.tearDown();
+ SlingContext.this.executeAfterTearDownCallback();
}
};
}
@@ -127,22 +140,42 @@ public final class SlingContext extends SlingContextImpl implements TestRule {
return this.delegate.apply(base, description);
}
- private void executeSetUpCallback() {
- if (this.setUpCallback != null) {
+ private void executeBeforeSetUpCallback() {
+ if (this.beforeSetUpCallback != null) {
+ try {
+ this.beforeSetUpCallback.execute(this);
+ } catch (Throwable ex) {
+ throw new RuntimeException("Before setup failed: " + ex.getMessage(), ex);
+ }
+ }
+ }
+
+ private void executeAfterSetUpCallback() {
+ if (this.afterSetUpCallback != null) {
+ try {
+ this.afterSetUpCallback.execute(this);
+ } catch (Throwable ex) {
+ throw new RuntimeException("After setup failed: " + ex.getMessage(), ex);
+ }
+ }
+ }
+
+ private void executeBeforeTearDownCallback() {
+ if (this.beforeTearDownCallback != null) {
try {
- this.setUpCallback.execute(this);
+ this.beforeTearDownCallback.execute(this);
} catch (Throwable ex) {
- throw new RuntimeException("Setup failed: " + ex.getMessage(), ex);
+ throw new RuntimeException("Before teardown failed: " + ex.getMessage(), ex);
}
}
}
- private void executeTearDownCallback() {
- if (this.tearDownCallback != null) {
+ private void executeAfterTearDownCallback() {
+ if (this.afterTearDownCallback != null) {
try {
- this.tearDownCallback.execute(this);
+ this.afterTearDownCallback.execute(this);
} catch (Throwable ex) {
- throw new RuntimeException("Teardown failed: " + ex.getMessage(), ex);
+ throw new RuntimeException("After teardown failed: " + ex.getMessage(), ex);
}
}
}
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
new file mode 100644
index 0000000..62080fa
--- /dev/null
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContextBuilder.java
@@ -0,0 +1,115 @@
+/*
+ * 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.junit;
+
+import java.util.Map;
+
+import org.apache.sling.testing.mock.sling.ResourceResolverType;
+
+/**
+ * Builder class for creating {@link SlingContext} instances with different sets of parameters.
+ */
+public final class SlingContextBuilder {
+
+ private ResourceResolverType resourceResolverType;
+ private SlingContextCallback beforeSetUpCallback;
+ private SlingContextCallback afterSetUpCallback;
+ private SlingContextCallback beforeTearDownCallback;
+ private SlingContextCallback afterTearDownCallback;
+ private Map<String, Object> resourceResolverFactoryActivatorProps;
+
+ /**
+ * Create builder with default resource resolver type.
+ */
+ public SlingContextBuilder() {}
+
+ /**
+ * Create builder with given resource resolver type.
+ * @param resourceResolverType Resource resolver type.
+ */
+ public SlingContextBuilder(ResourceResolverType resourceResolverType) {
+ this.resourceResolverType(resourceResolverType);
+ }
+
+ /**
+ * @param resourceResolverType Resource resolver type.
+ * @return this
+ */
+ public SlingContextBuilder resourceResolverType(ResourceResolverType resourceResolverType) {
+ this.resourceResolverType = resourceResolverType;
+ return this;
+ }
+
+ /**
+ * @param beforeSetUpCallback Allows the application to register an own callback function that is called before the built-in setup rules are executed.
+ * @return this
+ */
+ public SlingContextBuilder beforeSetUp(SlingContextCallback beforeSetUpCallback) {
+ this.beforeSetUpCallback = beforeSetUpCallback;
+ return this;
+ }
+
+ /**
+ * @param afterSetUpCallback Allows the application to register an own callback function that is called after the built-in setup rules are executed.
+ * @return this
+ */
+ public SlingContextBuilder afterSetUp(SlingContextCallback afterSetUpCallback) {
+ this.afterSetUpCallback = afterSetUpCallback;
+ return this;
+ }
+
+ /**
+ * @param beforeTearDownCallback Allows the application to register an own callback function that is called before the built-in teardown rules are executed.
+ * @return this
+ */
+ public SlingContextBuilder beforeTearDown(SlingContextCallback beforeTearDownCallback) {
+ this.beforeTearDownCallback = beforeTearDownCallback;
+ return this;
+ }
+
+ /**
+ * @param afterTearDownCallback Allows the application to register an own callback function that is after before the built-in teardown rules are executed.
+ * @return this
+ */
+ public SlingContextBuilder afterTearDown(SlingContextCallback afterTearDownCallback) {
+ this.afterTearDownCallback = afterTearDownCallback;
+ return this;
+ }
+
+ /**
+ * Allows to override OSGi configuration parameters for the Resource Resolver Factory Activator service.
+ * @param props Configuration properties
+ * @return this
+ */
+ public SlingContextBuilder resourceResolverFactoryActivatorProps(Map<String, Object> props) {
+ this.resourceResolverFactoryActivatorProps = props;
+ return this;
+ }
+
+ /**
+ * @return Build {@link SlingContext} instance.
+ */
+ public SlingContext build() {
+ return new SlingContext(this.beforeSetUpCallback, this.afterSetUpCallback,
+ this.beforeTearDownCallback, this.afterTearDownCallback,
+ this.resourceResolverFactoryActivatorProps,
+ this.resourceResolverType);
+ }
+
+}
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java
index b7888e3..d7acc84 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/package-info.java
@@ -19,5 +19,5 @@
/**
* Rule for providing easy access to Sling context in JUnit tests.
*/
-@aQute.bnd.annotation.Version("3.1")
+@aQute.bnd.annotation.Version("3.2")
package org.apache.sling.testing.mock.sling.junit;
diff --git a/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextTest.java b/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextTest.java
index b785f28..d4127ed 100644
--- a/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextTest.java
+++ b/src/test/java/org/apache/sling/testing/mock/sling/junit/SlingContextTest.java
@@ -36,21 +36,34 @@ import org.junit.runner.RunWith;
import org.mockito.runners.MockitoJUnitRunner;
import com.google.common.base.Function;
+import com.google.common.collect.ImmutableMap;
@RunWith(MockitoJUnitRunner.class)
public class SlingContextTest {
- private final SlingContextCallback contextSetup = mock(SlingContextCallback.class);
- private final SlingContextCallback contextTeardown = mock(SlingContextCallback.class);
+ private final SlingContextCallback contextBeforeSetup = mock(SlingContextCallback.class);
+ private final SlingContextCallback contextAfterSetup = mock(SlingContextCallback.class);
+ private final SlingContextCallback contextBeforeTeardown = mock(SlingContextCallback.class);
+ private final SlingContextCallback contextAfterTeardown = mock(SlingContextCallback.class);
// Run all unit tests for each resource resolver types listed here
@Rule
- public SlingContext context = new SlingContext(contextSetup, contextTeardown,
- ResourceResolverType.RESOURCERESOLVER_MOCK);
+ public SlingContext context = new SlingContextBuilder(ResourceResolverType.JCR_MOCK)
+ .beforeSetUp(contextBeforeSetup)
+ .afterSetUp(contextAfterSetup)
+ .beforeTearDown(contextBeforeTeardown)
+ .afterTearDown(contextAfterTeardown)
+ .resourceResolverFactoryActivatorProps(ImmutableMap.<String, Object>of("resource.resolver.searchpath", new String[] {
+ "/apps",
+ "/libs",
+ "/testpath",
+ }))
+ .build();
@Before
public void setUp() throws IOException, PersistenceException {
- verify(contextSetup).execute(context);
+ verify(contextBeforeSetup).execute(context);
+ verify(contextAfterSetup).execute(context);
}
@Test
@@ -58,6 +71,26 @@ public class SlingContextTest {
assertNotNull(context.request());
}
+ /**
+ * Test if custom searchpath /testpath added in this SlingContext is handled correctly.
+ */
+ @Test
+ public void testResourceResolverFactoryActivatorProps() {
+ context.create().resource("/apps/node1");
+
+ context.create().resource("/libs/node1");
+ context.create().resource("/libs/node2");
+
+ context.create().resource("/testpath/node1");
+ context.create().resource("/testpath/node2");
+ context.create().resource("/testpath/node3");
+
+ assertEquals("/apps/node1", context.resourceResolver().getResource("node1").getPath());
+ assertEquals("/libs/node2", context.resourceResolver().getResource("node2").getPath());
+ assertEquals("/testpath/node3", context.resourceResolver().getResource("node3").getPath());
+ assertNull(context.resourceResolver().getResource("node4"));
+ }
+
@Test
public void testRegisterAdapter() {
--
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/12:
[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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit a56450fc8aa067ab9baf29fdb6af7b734212e032
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 22:40:39 2016 +0000
[maven-release-plugin] prepare for next development iteration
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1728764 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 91976f5..f5b10e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
</parent>
<artifactId>org.apache.sling.testing.sling-mock</artifactId>
- <version>1.6.2</version>
+ <version>1.6.3-SNAPSHOT</version>
<packaging>bundle</packaging>
<name>Apache Sling Testing Sling Mock</name>
<description>Mock implementation of selected Sling APIs.</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.6.2</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.6.2</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-1.6.2</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock</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] 05/12: update branch url
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 0ac29f6626ab2e45019b8840169c30a38f152460
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Feb 22 22:16:13 2016 +0000
update branch url
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1731749 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/pom.xml b/pom.xml
index f5b10e2..46cc547 100644
--- a/pom.xml
+++ b/pom.xml
@@ -35,9 +35,9 @@
<description>Mock implementation of selected Sling APIs.</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/trunk/testing/mocks/sling-mock</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x</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] 12/12:
[maven-release-plugin] copy for tag
org.apache.sling.testing.sling-mock-1.7.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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 51a437197e27a3d8602739aac3afcb62b3429ac3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jul 12 10:27:12 2016 +0000
[maven-release-plugin] copy for tag org.apache.sling.testing.sling-mock-1.7.0
git-svn-id: https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.7.0@1752263 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/12:
[maven-release-plugin] prepare release
org.apache.sling.testing.sling-mock-1.7.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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 124d98e5beda7778642cefead1c0fddcf6eddff9
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jul 12 10:27:00 2016 +0000
[maven-release-plugin] prepare release org.apache.sling.testing.sling-mock-1.7.0
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1752262 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index 7de9d1b..be7e93e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -28,16 +28,16 @@
</parent>
<artifactId>org.apache.sling.testing.sling-mock</artifactId>
- <version>1.6.3-SNAPSHOT</version>
+ <version>1.7.0</version>
<packaging>bundle</packaging>
<name>Apache Sling Testing Sling Mock</name>
<description>Mock implementation of selected Sling APIs.</description>
<scm>
- <connection>scm:svn:http://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x</connection>
- <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x</developerConnection>
- <url>http://svn.apache.org/viewvc/sling/branches/testing/mocks/sling-mock-1.x</url>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.7.0</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/sling/tags/org.apache.sling.testing.sling-mock-1.7.0</developerConnection>
+ <url>http://svn.apache.org/viewvc/sling/tags/org.apache.sling.testing.sling-mock-1.7.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] 06/12: SLING-5551
MockSlingHttpServletRequest: make sure given bundleContext is used
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 780dae12084a8473ee8191cfe5c750c3bc54908e
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Feb 23 15:05:02 2016 +0000
SLING-5551 MockSlingHttpServletRequest: make sure given bundleContext is used
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1731881 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java b/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
index a404c44..a5afbe2 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/servlet/MockSlingHttpServletRequest.java
@@ -50,7 +50,7 @@ public class MockSlingHttpServletRequest extends org.apache.sling.servlethelpers
* @param bundleContext Bundle context
*/
public MockSlingHttpServletRequest(BundleContext bundleContext) {
- this(MockSling.newResourceResolver(bundleContext));
+ this(MockSling.newResourceResolver(bundleContext), bundleContext);
}
/**
--
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/12: 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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 117debd1e6787585dbb9ee2b00261eb44499aff5
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Jul 12 09:51:17 2016 +0000
update dependencies to released versions
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1752258 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/pom.xml b/pom.xml
index 46cc547..7de9d1b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,13 +51,13 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
- <version>1.1.12</version>
+ <version>1.1.14</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
- <version>1.1.12</version>
+ <version>1.1.14</version>
<scope>compile</scope>
</dependency>
<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/12: 1.x maintenance
branch
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 73356085e4891ae7331e4a58587c12e089047763
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Feb 22 22:14:47 2016 +0000
1.x maintenance branch
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1731748 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] 09/12: SLING-5770
update javadoc
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 9c111baf1c9c6753c4d71b1f0bd2111921e1715b
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Jul 8 16:11:29 2016 +0000
SLING-5770 update javadoc
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1751937 13f79535-47bb-0310-9956-ffa450edef68
---
.../java/org/apache/sling/testing/mock/sling/junit/SlingContext.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
index 7f7625a..9dcd712 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/junit/SlingContext.java
@@ -28,8 +28,9 @@ import org.junit.runner.Description;
import org.junit.runners.model.Statement;
/**
- * JUnit rule for setting up and tearing down Sling context objects for unit
- * tests.
+ * JUnit rule for setting up and tearing down Sling context objects for unit tests.
+ * You can use {@link SlingContextBuilder} alternatively to the constructors on this class - it offers
+ * more options and fine-grained control about setting up the test context.
*/
public final class SlingContext extends SlingContextImpl implements TestRule {
--
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/12: update to next
snapshot dependency until released artifacts are available in 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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 37d2b26fa7df507708029a20aac595436830d0c4
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Fri Feb 5 22:44:14 2016 +0000
update to next snapshot dependency until released artifacts are available in maven central
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1728766 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index f5b10e2..dca172f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,25 +45,25 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.osgi-mock</artifactId>
- <version>1.7.2</version>
+ <version>1.7.3-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
- <version>1.1.12</version>
+ <version>1.1.13-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
- <version>1.1.12</version>
+ <version>1.1.13-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlet-helpers</artifactId>
- <version>1.0.0</version>
+ <version>1.0.1-SNAPSHOT</version>
<scope>compile</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] 07/12: SLING-5552
ModelAdapterFactoryUtil: Suppress info log messages from Reflections
library
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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit 1d3a77fbff87d0ec874bc243de3341ec7fb5d0c6
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Tue Feb 23 15:07:59 2016 +0000
SLING-5552 ModelAdapterFactoryUtil: Suppress info log messages from Reflections library
git-svn-id: https://svn.apache.org/repos/asf/sling/branches/testing/mocks/sling-mock-1.x@1731883 13f79535-47bb-0310-9956-ffa450edef68
---
.../sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java b/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
index 43a4af4..3cc6327 100644
--- a/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
+++ b/src/main/java/org/apache/sling/testing/mock/sling/context/ModelAdapterFactoryUtil.java
@@ -44,6 +44,10 @@ import org.reflections.Reflections;
*/
final class ModelAdapterFactoryUtil {
+ static {
+ Reflections.log = null;
+ }
+
private ModelAdapterFactoryUtil() {
// static methods only
}
--
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/12: 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-1.7.0
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-testing-sling-mock.git
commit e39da4c9b9a4a92288021cf346787f8caa616ac3
Author: Stefan Seifert <ss...@apache.org>
AuthorDate: Mon Feb 8 23:13:03 2016 +0000
update to released versions
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk/testing/mocks/sling-mock@1729289 13f79535-47bb-0310-9956-ffa450edef68
---
pom.xml | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/pom.xml b/pom.xml
index dca172f..f5b10e2 100644
--- a/pom.xml
+++ b/pom.xml
@@ -45,25 +45,25 @@
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.osgi-mock</artifactId>
- <version>1.7.3-SNAPSHOT</version>
+ <version>1.7.2</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.jcr-mock</artifactId>
- <version>1.1.13-SNAPSHOT</version>
+ <version>1.1.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.testing.resourceresolver-mock</artifactId>
- <version>1.1.13-SNAPSHOT</version>
+ <version>1.1.12</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.sling</groupId>
<artifactId>org.apache.sling.servlet-helpers</artifactId>
- <version>1.0.1-SNAPSHOT</version>
+ <version>1.0.0</version>
<scope>compile</scope>
</dependency>
--
To stop receiving notification emails like this one, please contact
"commits@sling.apache.org" <co...@sling.apache.org>.