You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ni...@apache.org on 2010/11/05 10:57:52 UTC

svn commit: r1031497 - /camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java

Author: ningjiang
Date: Fri Nov  5 09:57:52 2010
New Revision: 1031497

URL: http://svn.apache.org/viewvc?rev=1031497&view=rev
Log:
CAMEL-3126 Fixed the XsltRouteTest error by adding the system package

Modified:
    camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java

Modified: camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java?rev=1031497&r1=1031496&r2=1031497&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java (original)
+++ camel/trunk/tests/camel-itest-osgi/src/test/java/org/apache/camel/itest/osgi/spring/xslt/XsltRouteTest.java Fri Nov  5 09:57:52 2010
@@ -19,13 +19,25 @@ package org.apache.camel.itest.osgi.spri
 import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.itest.osgi.OSGiIntegrationTestSupport;
-import org.junit.Ignore;
 import org.junit.Test;
 import org.junit.runner.RunWith;
+import org.ops4j.pax.exam.Option;
+import org.ops4j.pax.exam.junit.Configuration;
 import org.ops4j.pax.exam.junit.JUnit4TestRunner;
+import org.ops4j.pax.exam.options.UrlReference;
+
+import static org.ops4j.pax.exam.CoreOptions.equinox;
+import static org.ops4j.pax.exam.CoreOptions.felix;
+import static org.ops4j.pax.exam.CoreOptions.mavenBundle;
+import static org.ops4j.pax.exam.CoreOptions.options;
+import static org.ops4j.pax.exam.CoreOptions.systemPackage;
+
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.profile;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.scanFeatures;
+import static org.ops4j.pax.exam.container.def.PaxRunnerOptions.workingDirectory;
+
 
 @RunWith(JUnit4TestRunner.class)
-@Ignore("TODO: fix me")
 public class XsltRouteTest extends OSGiIntegrationTestSupport {
 
     @Test
@@ -51,5 +63,33 @@ public class XsltRouteTest extends OSGiI
             }
         };
     }
+    
+    @Configuration
+    public static Option[] configure() throws Exception {
+        Option[] options = options(
+            // install the spring dm profile            
+            profile("spring.dm").version("1.2.0"),
+            // setup the boot delegation of sun's package
+            //bootDelegationPackage("com.sun.org.apache.xml.internal.*"),
+            systemPackage("com.sun.org.apache.xalan.internal.xsltc"),
+            systemPackage("com.sun.org.apache.xml.internal.dtm"),
+            
+            // this is how you set the default log level when using pax logging (logProfile)
+            org.ops4j.pax.exam.CoreOptions.systemProperty("org.ops4j.pax.logging.DefaultServiceLog.level").value("INFO"),
+
+            // need to install some karaf features
+            scanFeatures(getKarafFeatureUrl(), "http"),
+
+            // using the features to install the camel components             
+            scanFeatures(getCamelKarafFeatureUrl(),                         
+                          "camel-core", "camel-spring", "camel-test"),
+            
+            workingDirectory("target/paxrunner/"),
+            
+            equinox(),
+            felix());
+        
+        return options;
+    }
 
 }