SLING-2788 - explain this better
git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1560942 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/pom.xml b/pom.xml
index a69e323..4f694fe 100644
--- a/pom.xml
+++ b/pom.xml
@@ -27,6 +27,11 @@
<packaging>jar</packaging>
<name>Apache Sling Pax Exam Utilities</name>
+
+ <description>
+ Utilities that make it easier to test Sling code with Pax Exam.
+ See this module's tests for usage examples.
+ </description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
diff --git a/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java b/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java
index b436511..18bbd3e 100644
--- a/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java
+++ b/src/test/java/org/apache/sling/paxexam/util/SlingRepositoryTest.java
@@ -34,11 +34,10 @@
/** Verify that our tests have access to a functional Sling instance,
* and demonstrate how a simple test is setup.
*
- * To create a test like this that runs against a full Sling launchpad
- * instance, one only needs the pax exam setup in the pom and a test
- * like this one that runs with @RunWith PaxExam, that provides a
- * Configuration method and can access services or the BundleContext
- * using @Inject.
+ * Note how little boilerplate this example test has. You basically just
+ * define which version of the Sling launchpad bundle list you want to use,
+ * and you can then @Inject any OSGi services to be tested, along with the
+ * BundleContext.
*/
@RunWith(PaxExam.class)
@ExamReactorStrategy(PerClass.class)
@@ -46,9 +45,12 @@
@Inject
private SlingRepository repository;
+ /** Use a released launchpad for this example */
+ public static final String SLING_LAUNCHPAD_VERSION = "6";
+
@org.ops4j.pax.exam.Configuration
public Option[] config() {
- return SlingPaxOptions.defaultLaunchpadOptions("6").getOptions();
+ return SlingPaxOptions.defaultLaunchpadOptions(SLING_LAUNCHPAD_VERSION).getOptions();
}
@Test
diff --git a/src/test/java/org/apache/sling/paxexam/util/SlingSetupTest.java b/src/test/java/org/apache/sling/paxexam/util/SlingSetupTest.java
index f11cd16..0738efd 100644
--- a/src/test/java/org/apache/sling/paxexam/util/SlingSetupTest.java
+++ b/src/test/java/org/apache/sling/paxexam/util/SlingSetupTest.java
@@ -40,12 +40,15 @@
@ExamReactorStrategy(PerClass.class)
public class SlingSetupTest {
+ /** Use a released launchpad for this example */
+ public static final String SLING_LAUNCHPAD_VERSION = "6";
+
@Inject
private BundleContext bundleContext;
@org.ops4j.pax.exam.Configuration
public Option[] config() {
- return SlingPaxOptions.defaultLaunchpadOptions("6").getOptions();
+ return SlingPaxOptions.defaultLaunchpadOptions(SLING_LAUNCHPAD_VERSION).getOptions();
}
private void assertBundleActive(String symbolicName) {