incubator-sling-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bdelacre...@apache.org
Subject svn commit: r1562095 - in /sling/trunk/contrib/extensions/i18n: pom.xml src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java
Date Tue, 28 Jan 2014 15:30:35 GMT
Author: bdelacretaz
Date: Tue Jan 28 15:30:35 2014
New Revision: 1562095

URL: http://svn.apache.org/r1562095
Log:
Reactivate ResourceBundleProviderIT with released org.apache.sling.paxexam.util

Modified:
    sling/trunk/contrib/extensions/i18n/pom.xml
    sling/trunk/contrib/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java

Modified: sling/trunk/contrib/extensions/i18n/pom.xml
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/i18n/pom.xml?rev=1562095&r1=1562094&r2=1562095&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/i18n/pom.xml (original)
+++ sling/trunk/contrib/extensions/i18n/pom.xml Tue Jan 28 15:30:35 2014
@@ -42,6 +42,7 @@
         <org.ops4j.pax.logging.DefaultServiceLog.level>INFO</org.ops4j.pax.logging.DefaultServiceLog.level>
         <bundle.file.name>${basedir}/target/${project.build.finalName}.jar</bundle.file.name>
         <sling.java.version>6</sling.java.version>
+        <sling.launchpad.version>7-SNAPSHOT</sling.launchpad.version>
     </properties>
 
     <scm>
@@ -102,6 +103,7 @@
                         <pax.exam.log.level>${pax.exam.log.level}</pax.exam.log.level>
                         <java.protocol.handler.pkgs>org.ops4j.pax.url</java.protocol.handler.pkgs>
                         <bundle.file.name>${bundle.file.name}</bundle.file.name>
+                        <sling.launchpad.version>${sling.launchpad.version}</sling.launchpad.version>
                     </systemPropertyVariables>
                     <classpathDependencyExcludes>
                         <!-- The osgi.org dependencies cause trouble with pax exam -->
@@ -117,8 +119,8 @@
                         <fileset>
                             <directory>${basedir}</directory>
                             <includes>
-                                <include>oak</include>
-                                <include>jackrabbit</include>
+                                <include>oak/**</include>
+                                <include>jackrabbit/**</include>
                                 <include>derby.log</include>
                             </includes>
                         </fileset>
@@ -140,6 +142,14 @@
             <version>2.1.0</version>
             <scope>provided</scope>
         </dependency>
+        <dependency>
+            <groupId>org.apache.sling</groupId>
+            <artifactId>org.apache.sling.launchpad</artifactId>
+            <version>${sling.launchpad.version}</version>
+            <type>xml</type>
+            <classifier>bundlelist</classifier>
+            <scope>test</scope>
+        </dependency>
 
         <dependency>
             <groupId>org.apache.sling</groupId>
@@ -186,15 +196,12 @@
             <artifactId>junit</artifactId>
             <scope>test</scope>
         </dependency>
-        <!--
-        No release yet available, omit for now
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.paxexam.util</artifactId>
-            <version>1.0-SNAPSHOT</version>
+            <version>1.0.2</version>
             <scope>test</scope>
         </dependency>
-        -->
         <dependency>
             <groupId>org.apache.sling</groupId>
             <artifactId>org.apache.sling.commons.testing</artifactId>

Modified: sling/trunk/contrib/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java
URL: http://svn.apache.org/viewvc/sling/trunk/contrib/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java?rev=1562095&r1=1562094&r2=1562095&view=diff
==============================================================================
--- sling/trunk/contrib/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java
(original)
+++ sling/trunk/contrib/extensions/i18n/src/test/java/org/apache/sling/i18n/it/ResourceBundleProviderIT.java
Tue Jan 28 15:30:35 2014
@@ -18,44 +18,63 @@
  */
 package org.apache.sling.i18n.it;
 
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.fail;
 
 import java.io.File;
+import java.util.Locale;
+import java.util.ResourceBundle;
 
+import javax.inject.Inject;
+import javax.jcr.Node;
+import javax.jcr.RepositoryException;
+import javax.jcr.Session;
+
+import org.apache.sling.i18n.ResourceBundleProvider;
+import org.apache.sling.i18n.impl.Message;
+import org.apache.sling.jcr.api.SlingRepository;
+import org.apache.sling.paxexam.util.SlingPaxOptions;
+import org.junit.After;
+import org.junit.Before;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.CoreOptions;
 import org.ops4j.pax.exam.Option;
 import org.ops4j.pax.exam.junit.PaxExam;
 import org.ops4j.pax.exam.options.DefaultCompositeOption;
 import org.ops4j.pax.exam.spi.reactors.ExamReactorStrategy;
 import org.ops4j.pax.exam.spi.reactors.PerClass;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 @RunWith(PaxExam.class)
 @ExamReactorStrategy(PerClass.class)
 public class ResourceBundleProviderIT {
 
-//    private final Logger log = LoggerFactory.getLogger(getClass());
-//
-//    public static final int RETRY_TIMEOUT_MSEC = 5000;
-//    public static final String MSG_KEY = "foo";
-//
-//    @Inject
-//    private SlingRepository repository;
-//
-//    @Inject
-//    private ResourceBundleProvider resourceBundleProvider;
-//
-//    private Session session;
-//    private Node i18nRoot;
-//    private Node deRoot;
-//    private Node frRoot;
+    private final Logger log = LoggerFactory.getLogger(getClass());
+
+    public static final int RETRY_TIMEOUT_MSEC = 5000;
+    public static final String MSG_KEY = "foo";
+
+    @Inject
+    private SlingRepository repository;
+
+    @Inject
+    private ResourceBundleProvider resourceBundleProvider;
+
+    private Session session;
+    private Node i18nRoot;
+    private Node deRoot;
+    private Node frRoot;
 
     @org.ops4j.pax.exam.Configuration
     public Option[] config() {
         final File thisProjectsBundle = new File(System.getProperty( "bundle.file.name",
"BUNDLE_FILE_NOT_SET" ));
+        final String launchpadVersion = System.getProperty("sling.launchpad.version", "LAUNCHPAD_VERSION_NOT_SET");
         return new DefaultCompositeOption(
-//                SlingPaxOptions.defaultLaunchpadOptions("7-SNAPSHOT"),
-//                provision(bundle(thisProjectsBundle.toURI().toString()))
+                SlingPaxOptions.defaultLaunchpadOptions(launchpadVersion),
+                CoreOptions.provision(CoreOptions.bundle(thisProjectsBundle.toURI().toString()))
                 ).getOptions();
     }
 
@@ -86,7 +105,6 @@ public class ResourceBundleProviderIT {
         System.err.println("All tests are disabled for now ....");
     }
 
-/*
     @Before
     public void setup() throws RepositoryException {
         session = repository.loginAdministrative(null);
@@ -163,5 +181,4 @@ public class ResourceBundleProviderIT {
         session.save();
         assertMessages("DE_changed", "FR_changed");
     }
-*/
 }



Mime
View raw message