cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From reinh...@apache.org
Subject svn commit: r650931 - /cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
Date Wed, 23 Apr 2008 16:18:20 GMT
Author: reinhard
Date: Wed Apr 23 09:18:18 2008
New Revision: 650931

URL: http://svn.apache.org/viewvc?rev=650931&view=rev
Log:
fix test cases after changing how relative paths are resolved

Modified:
    cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java

Modified: cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
URL: http://svn.apache.org/viewvc/cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java?rev=650931&r1=650930&r2=650931&view=diff
==============================================================================
--- cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
(original)
+++ cocoon/whiteboard/corona/trunk/corona-sample/src/test/java/org/apache/cocoon/corona/sitemap/SitemapBuilderTest.java
Wed Apr 23 09:18:18 2008
@@ -91,14 +91,13 @@
 
         assertNotNull(invocationResult);
         assertTrue(invocation.isErrorInvocation());
-        assertTrue("Expected NoMatchingPipelineException but received " + invocation.getThrowable(),
-                invocation.getThrowable() instanceof NoMatchingPipelineException);
+        assertTrue("Expected NoMatchingPipelineException but received " + invocation.getThrowable(),
invocation
+                .getThrowable() instanceof NoMatchingPipelineException);
     }
 
-
     public void testController() {
         Invocation invocation = this.buildInvocation("controller/invoke");
-        InvocationResult invocationResult = sitemap.invoke(invocation);
+        InvocationResult invocationResult = this.sitemap.invoke(invocation);
         assertNotNull(invocationResult);
         assertTrue(invocationResult.isCompleted());
     }
@@ -188,20 +187,24 @@
         ApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]
{
                 "META-INF/cocoon/spring/applicationContext.xml", "META-INF/cocoon/spring/corona-pipeline-action.xml",
                 "META-INF/cocoon/spring/corona-pipeline-component.xml", "META-INF/cocoon/spring/corona-pipeline.xml",
-                "META-INF/cocoon/spring/corona-sitemap-node.xml", "META-INF/cocoon/spring/corona-expression-language.xml",
-                "META-INF/cocoon/spring/corona-servlet-node.xml", "META-INF/cocoon/spring/corona-servlet-component.xml",
-                "META-INF/cocoon/spring/corona-controller.xml"});
+                "META-INF/cocoon/spring/corona-sitemap-node.xml",
+                "META-INF/cocoon/spring/corona-expression-language.xml",
+                "META-INF/cocoon/spring/corona-servlet-node.xml",
+                "META-INF/cocoon/spring/corona-servlet-component.xml", "META-INF/cocoon/spring/corona-controller.xml"
});
 
-        this.componentProvider = (ComponentProvider) applicationContext.getBean("org.apache.cocoon.corona.sitemap.ComponentProvider");
+        this.componentProvider = (ComponentProvider) applicationContext
+                .getBean("org.apache.cocoon.corona.sitemap.ComponentProvider");
 
         URL sitemapURL = this.getClass().getResource("/COB-INF/sitemap.xmap");
-        this.sitemapBuilder = (SitemapBuilder) applicationContext.getBean("org.apache.cocoon.corona.sitemap.SitemapBuilder");
+        this.sitemapBuilder = (SitemapBuilder) applicationContext
+                .getBean("org.apache.cocoon.corona.sitemap.SitemapBuilder");
         this.sitemap = this.sitemapBuilder.build(sitemapURL);
     }
 
     private Invocation buildInvocation(String request) {
         InvocationImpl invocation = new InvocationImpl(System.out);
 
+        invocation.setBaseURL(this.getClass().getResource("/COB-INF/"));
         invocation.setRequestURI(request);
         invocation.setComponentProvider(this.componentProvider);
 



Mime
View raw message