You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by bd...@apache.org on 2015/11/19 22:24:09 UTC

svn commit: r1715283 - /sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext

Author: bdelacretaz
Date: Thu Nov 19 21:24:08 2015
New Revision: 1715283

URL: http://svn.apache.org/viewvc?rev=1715283&view=rev
Log:
SLING-5294 - mention the withResources option

Modified:
    sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext

Modified: sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext
URL: http://svn.apache.org/viewvc/sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext?rev=1715283&r1=1715282&r2=1715283&view=diff
==============================================================================
--- sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext (original)
+++ sling/site/trunk/content/documentation/bundles/org-apache-sling-junit-bundles.mdtext Thu Nov 19 21:24:08 2015
@@ -61,6 +61,17 @@ selection, like for example:
 
     final StringTransformer t = teleporter.getService(StringTransformer.class, "(mode=uppercase)");
 
+And starting with version 1.0.4 of the `org.apache.sling.junit.teleporter` bundle, you can specify
+resource to embed in the test bundle, as in this example:
+
+    @Rule
+    public final TeleporterRule teleporter = 
+      TeleporterRule.forClass(getClass(), "Launchpad")
+      .withResources("/foo/", "/some/other/resource.txt");
+
+which will embed all resources found under `/foo` as well as the `resource.txt` in the test
+bundle, making them available to the server-side tests.
+
 This teleporter mechanism is used in our integration tests, search for `TeleporterRule` in there
 for examples or look at the 
 [`integrationtest.teleporter`]( https://svn.apache.org/repos/asf/sling/trunk/launchpad/integration-tests/src/main/java/org/apache/sling/launchpad/webapp/integrationtest/teleporter)