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 2014/09/24 18:24:28 UTC

svn commit: r923410 - in /websites/staging/sling/trunk/content: ./ documentation/tutorials-how-tos/testing-sling-based-applications.html

Author: buildbot
Date: Wed Sep 24 16:24:28 2014
New Revision: 923410

Log:
Staging update by buildbot for sling

Modified:
    websites/staging/sling/trunk/content/   (props changed)
    websites/staging/sling/trunk/content/documentation/tutorials-how-tos/testing-sling-based-applications.html

Propchange: websites/staging/sling/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Wed Sep 24 16:24:28 2014
@@ -1 +1 @@
-1627360
+1627361

Modified: websites/staging/sling/trunk/content/documentation/tutorials-how-tos/testing-sling-based-applications.html
==============================================================================
--- websites/staging/sling/trunk/content/documentation/tutorials-how-tos/testing-sling-based-applications.html (original)
+++ websites/staging/sling/trunk/content/documentation/tutorials-how-tos/testing-sling-based-applications.html Wed Sep 24 16:24:28 2014
@@ -115,7 +115,7 @@
 <h2 id="mock-classes-and-services">Mock classes and services</h2>
 <p>The next step is to use mock classes and services to simulate components that are needed for testing. This makes it possible to test OSGi service classes without an OSGi framework.</p>
 <p>We have a number of custom-written mock services in Sling, like <a href="https://svn.apache.org/repos/asf/sling/trunk/bundles/commons/testing/src/main/java/org/apache/sling/commons/testing/jcr/MockNodeType.java">MockNodeType</a> for example. These handwritten mocks implement just what's needed for their tests, so they might not be reusable as is.</p>
-<p>A quite powerful mock implementation of a Sling Resource Resolver (without underlying JCR respository, but mimicking the behavior of the JCR Resource Provider) is provided in <a href="https://svn.eu.apache.org/repos/asf/sling/trunk/testing/resourceresolver-mock">testing/resourceresolver-mock</a>. It uses an in-memory map for storing the resource data, and supports reading, writing and a certain level of transaction and eventing support. Usage example:</p>
+<p>A quite powerful mock implementation of a Sling Resource Resolver (without underlying JCR respository, but mimicking the behavior of the JCR Resource Provider) is provided in <a href="https://svn.apache.org/repos/asf/sling/trunk/testing/resourceresolver-mock">testing/resourceresolver-mock</a>. It uses an in-memory map for storing the resource data, and supports reading, writing and a certain level of transaction and eventing support. Usage example:</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">MockResourceResolverFactory</span> <span class="n">factory</span> <span class="o">=</span> <span class="k">new</span> <span class="n">MockResourceResolverFactory</span><span class="o">();</span>
 <span class="n">ResourceResolver</span> <span class="n">resolver</span> <span class="o">=</span> <span class="n">factory</span><span class="o">.</span><span class="na">getResourceResolver</span><span class="o">(</span><span class="kc">null</span><span class="o">);</span>
@@ -161,7 +161,7 @@ such as the <a href="http://junit-addons
 <h2 id="summary">Summary</h2>
 <p>Combining the above testing techniques has worked well for us in creating and testing Sling. Being able to test things at different levels of integration has proved an efficient way to get good test coverage without having to write too much boring test code.</p>
       <div class="timestamp" style="margin-top: 30px; font-size: 80%; text-align: right;">
-        Rev. 1627360 by sseifert on Wed, 24 Sep 2014 16:22:37 +0000
+        Rev. 1627361 by sseifert on Wed, 24 Sep 2014 16:24:21 +0000
       </div>
       <div class="trademarkFooter"> 
         Apache Sling, Sling, Apache, the Apache feather logo, and the Apache Sling project