You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bu...@apache.org on 2015/01/15 21:27:52 UTC
svn commit: r936359 - in /websites/staging/sling/trunk/content: ./
documentation/development/osgi-mock.html
documentation/development/resourceresolver-mock.html
documentation/development/sling-mock.html
Author: buildbot
Date: Thu Jan 15 20:27:51 2015
New Revision: 936359
Log:
Staging update by buildbot for sling
Modified:
websites/staging/sling/trunk/content/ (props changed)
websites/staging/sling/trunk/content/documentation/development/osgi-mock.html
websites/staging/sling/trunk/content/documentation/development/resourceresolver-mock.html
websites/staging/sling/trunk/content/documentation/development/sling-mock.html
Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Jan 15 20:27:51 2015
@@ -1 +1 @@
-1651749
+1652263
Modified: websites/staging/sling/trunk/content/documentation/development/osgi-mock.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/osgi-mock.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/osgi-mock.html Thu Jan 15 20:27:51 2015
@@ -123,7 +123,7 @@
<li>Supports reading OSGi SCR metadata from <code>/OSGI-INF/<pid>.xml</code></li>
<li>Apply service properties/component configuration provided in unit test and from SCR metadata</li>
<li>Inject SCR dependencies</li>
-<li>Call lifecyle methods for activating, deactivating or modifying SCR components</li>
+<li>Call lifecycle methods for activating, deactivating or modifying SCR components</li>
<li>Service and bundle listener implementation</li>
<li>Mock implementation of <code>LogService</code> which logs to SLF4J in JUnit context</li>
</ul>
@@ -265,7 +265,7 @@ missing if your clean and build the proj
project again with maven and can run the tests - or use a Maven IDE Integration like m2eclipse.</li>
</ul>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1639795 by sseifert on Fri, 14 Nov 2014 21:56:35 +0000
+ Rev. 1652263 by sseifert on Thu, 15 Jan 2015 20:27:35 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
Modified: websites/staging/sling/trunk/content/documentation/development/resourceresolver-mock.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/resourceresolver-mock.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/resourceresolver-mock.html Thu Jan 15 20:27:51 2015
@@ -114,16 +114,16 @@
<p>The mock implementation supports:</p>
<ul>
<li>All read and write operations of the Sling Resource API</li>
-<li>Mimicks transactions using via commit()/revert() methods</li>
+<li>Mimics transactions using via commit()/revert() methods</li>
<li>OSGi events for adding/changing/removing resources</li>
<li>The implementation tries to be as close as possible to the behavior of the JCR resource implementation e.g. concerning date and binary handling</li>
</ul>
<p>The following features are <em>not supported</em>:</p>
<ul>
<li>Authentication not supported ("login" always possible with null authentication info)</li>
-<li>Querying with qeuryResources/findResources not supported (always returns empty result set)</li>
+<li>Querying with queryResources/findResources not supported (always returns empty result set)</li>
<li>Sling Mapping is not supported</li>
-<li>Resolving resouce super types</li>
+<li>Resolving resource super types</li>
</ul>
<h2 id="usage">Usage</h2>
<p>To create a mocked resource resolver:</p>
@@ -136,7 +136,7 @@
<p>With the resolver you can use all Sling Resource features including reading and writing data using the Sling API.</p>
<p>You cannot do any operations that require the JCR API because no JCR is underlying and adapting to JCR objects will just return null.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1631410 by sseifert on Mon, 13 Oct 2014 14:24:15 +0000
+ Rev. 1652263 by sseifert on Thu, 15 Jan 2015 20:27:35 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project
Modified: websites/staging/sling/trunk/content/documentation/development/sling-mock.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/development/sling-mock.html (original)
+++ websites/staging/sling/trunk/content/documentation/development/sling-mock.html Thu Jan 15 20:27:51 2015
@@ -136,14 +136,14 @@
<a href="/documentation/development/resourceresolver-mock.html">Sling resourceresolver-mock implementation</a> can be used</li>
</ul>
</li>
-<li><code>AdpaterManager</code> implementation for registering adapter factories and resolving adaptions<ul>
+<li><code>AdapterManager</code> implementation for registering adapter factories and resolving adaptions<ul>
<li>The implementation is thread-safe so it can be used in parallel running unit tests</li>
</ul>
</li>
<li><code>SlingScriptHelper</code> implementation providing access to mocked request/response objects and supports getting
OSGi services from the <a href="/documentation/development/osgi-mock.html">mocked OSGi</a> environment.</li>
<li>Implementations of the servlet-related Sling API classes like <code>SlingHttpServletRequest</code> and <code>SlingHttpServletRequest</code><ul>
-<li>It is possible to set request data to simulate a certian Sling HTTP request</li>
+<li>It is possible to set request data to simulate a certain Sling HTTP request</li>
</ul>
</li>
<li>Additional services like <code>MockModelAdapterFactory</code> and <code>MimeTypeService</code> </li>
@@ -158,7 +158,7 @@
<h3 id="additional-features">Additional features</h3>
<p>Additional features provided:</p>
<ul>
-<li><code>SlingContext</code> JUnit Rule for easily setting up a Sling Mock environment in your JUnit testcases</li>
+<li><code>SlingContext</code> JUnit Rule for easily setting up a Sling Mock environment in your JUnit test cases</li>
<li><code>ContentLoader</code> supports importing JSON data and binary data into the mock resource hierarchy to easily
prepare a test fixture consisting of a hierarchy of resources and properties.<ul>
<li>The same JSON format can be used that is provided by the Sling GET servlet for output</li>
@@ -234,7 +234,7 @@ independently (and in parallel, if requi
<p>Different resource resolver mock types are supported with pros and cons, see next chapter for details.</p>
<h3 id="resource-resolver-types">Resource Resolver Types</h3>
<p>The Sling Mocks resource resolver implementation supports different "types" of adapters for the mocks.
-Depending on the type an underlying JCR repository is used or not, and the data ist stored in-memory or in a real
+Depending on the type an underlying JCR repository is used or not, and the data is stored in-memory or in a real
repository.</p>
<p>Resource resolver types currently supported:</p>
<p><strong>RESOURCERESOLVER_MOCK (default)</strong></p>
@@ -321,7 +321,7 @@ repository.</p>
</td></tr></table>
<p>Make sure you clean up the adapter manager bundle association after running the unit test otherwise it can
-interfere with the following tests. If you use the <code>SlingContext</code> Junit rule this is done automatically for you.</p>
+interfere with the following tests. If you use the <code>SlingContext</code> JUnit rule this is done automatically for you.</p>
<p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.registerService()</code>.</p>
<h3 id="slingscripthelper">SlingScriptHelper</h3>
<p>Example:</p>
@@ -521,7 +521,7 @@ imports the JSON data to this node. It c
<p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.load()</code>.</p>
<h3 id="import-binary-data-from-file-in-classpath">Import binary data from file in classpath</h3>
<p>With the <code>ContentLoader</code> it is possible to import a binary file stored in the classpath beneath the unit tests.
-The data is stored usig a nt:file/nt:resource or nt:resource node type. </p>
+The data is stored using a nt:file/nt:resource or nt:resource node type. </p>
<p>Example code to import a binary file:</p>
<table class="codehilitetable"><tr><td class="linenos"><div class="linenodiv"><pre>1
2</pre></div></td><td class="code"><div class="codehilite"><pre><span class="n">ContentLoader</span> <span class="n">contentLoader</span> <span class="o">=</span> <span class="k">new</span> <span class="n">ContentLoader</span><span class="o">(</span><span class="n">resolver</span><span class="o">);</span>
@@ -549,7 +549,7 @@ resources) and imports the binary data t
<p>If you use the <code>SlingContext</code> JUnit rule you case just use <code>context.create()</code>.</p>
<div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
- Rev. 1639795 by sseifert on Fri, 14 Nov 2014 21:56:35 +0000
+ Rev. 1652263 by sseifert on Thu, 15 Jan 2015 20:27:35 +0000
</div>
<div class="trademarkFooter">
Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project