cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject svn commit: rev 55453 - in cocoon/trunk: . lib lib/core src/blocks/chaperon/test/org/apache/cocoon/generation src/blocks/chaperon/test/org/apache/cocoon/transformation src/blocks/forms/test/org/apache/cocoon/forms/datatype src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript src/blocks/midi/test/org/apache/cocoon/generation src/blocks/midi/test/org/apache/cocoon/serialization src/blocks/scratchpad/test/org/apache/cocoon/components/source/impl src/blocks/webdav/test/org/apache/cocoon/components/source/impl src/blocks/woody/test/org/apache/cocoon/woody/datatype tools/targets
Date Sun, 24 Oct 2004 17:36:30 GMT
Author: cziegeler
Date: Sun Oct 24 10:36:28 2004
New Revision: 55453

Removed:
   cocoon/trunk/lib/core/excalibur-component-1.2.jar
Modified:
   cocoon/trunk/gump.xml
   cocoon/trunk/lib/jars.xml
   cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/generation/TextGeneratorTestCase.java
   cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/LexicalTransformerTestCase.java
   cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/ParserTransformerTestCase.java
   cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/PatternTransformerTestCase.java
   cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
   cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
   cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
   cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test/JavaFlowTestCase.java
   cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript/JavaScriptFlowTestCase.java
   cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/generation/XMidiGeneratorTestCase.java
   cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/serialization/XMidiSerializerTestCase.java
   cocoon/trunk/src/blocks/scratchpad/test/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
   cocoon/trunk/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
   cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.java
   cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/EnumSelectionListTestCase.java
   cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/FlowJXPathSelectionListTestCase.java
   cocoon/trunk/tools/targets/ide-build.xml
Log:
Add block tests to eclipse project
Fix block tests
Remove dependency to excalibur-component

Modified: cocoon/trunk/gump.xml
==============================================================================
--- cocoon/trunk/gump.xml	(original)
+++ cocoon/trunk/gump.xml	Sun Oct 24 10:36:28 2004
@@ -59,7 +59,6 @@
     <depend project="excalibur-xmlutil"/>
     <depend project="excalibur-store"/>
     <depend project="excalibur-pool"/>
-    <depend project="excalibur-component"/>
     <depend project="excalibur-logger"/>
     <depend project="excalibur-event-api"/>
     <depend project="excalibur-event-impl"/>

Modified: cocoon/trunk/lib/jars.xml
==============================================================================
--- cocoon/trunk/lib/jars.xml	(original)
+++ cocoon/trunk/lib/jars.xml	Sun Oct 24 10:36:28 2004
@@ -58,17 +58,6 @@
   </file>
 
   <file>
-    <title>Avalon Excalibur Component</title>
-    <description>
-      Part of avalon, it is a set of classes and patterns that
-      support high level server development.
-    </description>
-    <used-by>Cocoon</used-by>
-    <lib>core/excalibur-component-1.2.jar</lib>
-    <homepage>http://avalon.apache.org/excalibur/</homepage>
-  </file>
-
-  <file>
     <title>Avalon Excalibur Event</title>
     <description>
       This is the Excalibur Event package which includes event queues,

Modified: cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/generation/TextGeneratorTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/generation/TextGeneratorTestCase.java
(original)
+++ cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/generation/TextGeneratorTestCase.java
Sun Oct 24 10:36:28 2004
@@ -16,10 +16,6 @@
 
 package org.apache.cocoon.generation;
 
-import java.io.InputStream;
-import java.io.IOException;
-import java.util.HashMap;
-
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.SitemapComponentTestCase;
 
@@ -27,13 +23,9 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: TextGeneratorTestCase.java,v 1.5 2004/03/05 13:01:48 bdelacretaz Exp
$
+ * @version CVS $Id$
  */
 public class TextGeneratorTestCase extends SitemapComponentTestCase {
-
-    public TextGeneratorTestCase(String name) {
-        super(name);
-    }
 
     public void testTextGenerator1() throws Exception {
         String src = "resource://org/apache/cocoon/generation/texttest-input1.txt";

Modified: cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/LexicalTransformerTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/LexicalTransformerTestCase.java
(original)
+++ cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/LexicalTransformerTestCase.java
Sun Oct 24 10:36:28 2004
@@ -16,8 +16,6 @@
 
 package org.apache.cocoon.transformation;
 
-import java.util.HashMap;
-
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.SitemapComponentTestCase;
 
@@ -25,13 +23,9 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: LexicalTransformerTestCase.java,v 1.6 2004/03/05 13:01:48 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class LexicalTransformerTestCase extends SitemapComponentTestCase {
-
-    public LexicalTransformerTestCase(String name) {
-        super(name);
-    }
 
     public void testLexicalTransformer1() throws Exception {
         String src = "resource://org/apache/cocoon/transformation/lexertest-lexicon1.xml";

Modified: cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/ParserTransformerTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/ParserTransformerTestCase.java
(original)
+++ cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/ParserTransformerTestCase.java
Sun Oct 24 10:36:28 2004
@@ -16,8 +16,6 @@
 
 package org.apache.cocoon.transformation;
 
-import java.util.HashMap;
-
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.SitemapComponentTestCase;
 
@@ -25,13 +23,9 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: ParserTransformerTestCase.java,v 1.6 2004/03/05 13:01:48 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class ParserTransformerTestCase extends SitemapComponentTestCase {
-
-    public ParserTransformerTestCase(String name) {
-        super(name);
-    }
 
     public void testParserTransformer1() throws Exception {
 

Modified: cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/PatternTransformerTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/PatternTransformerTestCase.java
(original)
+++ cocoon/trunk/src/blocks/chaperon/test/org/apache/cocoon/transformation/PatternTransformerTestCase.java
Sun Oct 24 10:36:28 2004
@@ -16,8 +16,6 @@
 
 package org.apache.cocoon.transformation;
 
-import java.util.HashMap;
-
 import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.SitemapComponentTestCase;
 
@@ -25,13 +23,9 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: PatternTransformerTestCase.java,v 1.5 2004/03/05 13:01:48 bdelacretaz
Exp $
+ * @version CVS $Id$
  */
 public class PatternTransformerTestCase extends SitemapComponentTestCase {
-
-    public PatternTransformerTestCase(String name) {
-        super(name);
-    }
 
     public void testPatternTransformer() throws Exception {
 

Modified: cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -25,9 +25,7 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.forms.Constants;
 import org.apache.cocoon.xml.dom.DOMBuilder;
 import org.apache.excalibur.source.impl.ResourceSource;
@@ -37,29 +35,19 @@
 
 /**
  * Test case for CForms's DynamicSelectionList datatype.
- * @version CVS $Id: DynamicSelectionListTestCase.java,v 1.4 2004/03/11 02:56:32 joerg Exp
$
+ * @version CVS $Id$
  */
-public class DynamicSelectionListTestCase extends ExcaliburTestCase {
+public class DynamicSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public DynamicSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -70,7 +58,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }
@@ -88,7 +76,7 @@
         Element datatypeElement = (Element) sourceDoc.getElementsByTagNameNS(Constants.DEFINITION_NS,
"convertor").item(0);
         Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
         DynamicSelectionList list = 
-            new DynamicSelectionList(datatype, null, serviceManager);
+            new DynamicSelectionList(datatype, null, this.getManager());
         list.generateSaxFragment(dest, Locale.ENGLISH, source);
         ResourceSource expectedSource =
             new ResourceSource("resource://org/apache/cocoon/forms/datatype/DynamicSelectionListTestCase.dest.xml");

Modified: cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/EnumSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -25,10 +25,8 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
 import org.apache.cocoon.transformation.I18nTransformer;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.forms.Constants;
 import org.apache.cocoon.forms.datatype.typeimpl.EnumType;
 import org.apache.cocoon.xml.dom.DOMBuilder;
@@ -38,29 +36,19 @@
 
 /**
  * Test case for CForms's DynamicSelectionList datatype.
- * @version CVS $Id: EnumSelectionListTestCase.java,v 1.5 2004/03/11 02:56:32 joerg Exp $
+ * @version CVS $Id$
  */
-public class EnumSelectionListTestCase extends ExcaliburTestCase {
+public class EnumSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public EnumSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -71,7 +59,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }

Modified: cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/forms/test/org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -29,13 +29,11 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.FlowHelper;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.mock.MockRequest;
@@ -49,29 +47,19 @@
 
 /**
  * Test case for CForms's FlowModelSelectionList datatype.
- * @version CVS $Id: FlowJXPathSelectionListTestCase.java,v 1.5 2004/04/26 21:29:50 bruno
Exp $
+ * @version CVS $Id$
  */
-public class FlowJXPathSelectionListTestCase extends ExcaliburTestCase {
+public class FlowJXPathSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public FlowJXPathSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -82,7 +70,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }

Modified: cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test/JavaFlowTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test/JavaFlowTestCase.java
(original)
+++ cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/java/test/JavaFlowTestCase.java
Sun Oct 24 10:36:28 2004
@@ -26,14 +26,10 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: JavaFlowTestCase.java,v 1.4 2004/06/26 18:29:30 stephan Exp $
+ * @version CVS $Id$
  */
 public class JavaFlowTestCase extends SitemapComponentTestCase {
 
-    public JavaFlowTestCase(String name) {
-        super(name);
-    }
-    
     public void testSimple() throws Exception {
         String source = "org.apache.cocoon.components.flow.java.test.SimpleFlow";
         String id = callFunction("java", source, "simpleTest", new HashMap());

Modified: cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript/JavaScriptFlowTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript/JavaScriptFlowTestCase.java
(original)
+++ cocoon/trunk/src/blocks/javaflow/test/org/apache/cocoon/components/flow/javascript/JavaScriptFlowTestCase.java
Sun Oct 24 10:36:28 2004
@@ -24,14 +24,10 @@
  *
  *
  * @author <a href="mailto:stephan@apache.org">Stephan Michels </a>
- * @version CVS $Id: JavaScriptFlowTestCase.java,v 1.3 2004/06/24 16:48:53 stephan Exp $
+ * @version CVS $Id$
  */
 public class JavaScriptFlowTestCase extends SitemapComponentTestCase {
 
-    public JavaScriptFlowTestCase(String name) {
-        super(name);
-    }
-    
     public void testCalculator() throws Exception {
         String source = "resource://org/apache/cocoon/components/flow/javascript/calc.js";
         callFunction("javascript", source, "calculator", new HashMap());

Modified: cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/generation/XMidiGeneratorTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/generation/XMidiGeneratorTestCase.java
(original)
+++ cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/generation/XMidiGeneratorTestCase.java
Sun Oct 24 10:36:28 2004
@@ -23,21 +23,14 @@
  * Test case for the MIDIGenerator
  * @author Mark Leicester
  */
-public class XMidiGeneratorTestCase extends SitemapComponentTestCase
-{
+public class XMidiGeneratorTestCase extends SitemapComponentTestCase {
 
-  public XMidiGeneratorTestCase(String name)
-  {
-    super(name);
-  }
+    public void testMIDIGenerator() throws Exception {
+        String type = "midi";
+        String src = "resource://org/apache/cocoon/generation/prelude.mid";
+        Parameters parameters = new Parameters();
+        String result = "resource://org/apache/cocoon/generation/prelude.xmi";
 
-  public void testMIDIGenerator() throws Exception
-  {
-    String type = "midi";
-    String src = "resource://org/apache/cocoon/generation/prelude.mid";
-    Parameters parameters = new Parameters();
-    String result = "resource://org/apache/cocoon/generation/prelude.xmi";
-
-    assertEqual(load(result), generate(type, src, parameters));
-  }
+        assertEqual(load(result), generate(type, src, parameters));
+    }
 }

Modified: cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/serialization/XMidiSerializerTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/serialization/XMidiSerializerTestCase.java
(original)
+++ cocoon/trunk/src/blocks/midi/test/org/apache/cocoon/serialization/XMidiSerializerTestCase.java
Sun Oct 24 10:36:28 2004
@@ -23,21 +23,14 @@
  * Test case for the MIDISerializer
  * @author Mark Leicester
  */
-public class XMidiSerializerTestCase extends SitemapComponentTestCase
-{
+public class XMidiSerializerTestCase extends SitemapComponentTestCase {
 
-  public XMidiSerializerTestCase(String name)
-  {
-    super(name);
-  }
+    public void testMIDISerializer() throws Exception {
+        String type = "midi";
+        String input = "resource://org/apache/cocoon/generation/prelude.xmi";
+        Parameters parameters = new Parameters();
+        String control = "resource://org/apache/cocoon/generation/prelude.mid";
 
-  public void testMIDISerializer() throws Exception
-  {
-    String type = "midi";
-    String input = "resource://org/apache/cocoon/generation/prelude.xmi";
-    Parameters parameters = new Parameters();
-    String control = "resource://org/apache/cocoon/generation/prelude.mid";
-
-		assertIdentical(loadByteArray(control), serialize(type, parameters, load(input)));
-  }
+       assertIdentical(loadByteArray(control), serialize(type, parameters, load(input)));
+    }
 }

Modified: cocoon/trunk/src/blocks/scratchpad/test/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/scratchpad/test/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
(original)
+++ cocoon/trunk/src/blocks/scratchpad/test/org/apache/cocoon/components/source/impl/CachingSourceTestCase.java
Sun Oct 24 10:36:28 2004
@@ -17,42 +17,32 @@
 
 import java.io.File;
 import java.io.InputStream;
-import java.util.Collection;
 import java.util.Iterator;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
 import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.logger.LogKitLogger;
-import org.apache.avalon.framework.parameters.Parameters;
 import org.apache.cocoon.Constants;
-import org.apache.cocoon.caching.Cache;
 import org.apache.cocoon.caching.IdentifierCacheKey;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.environment.mock.MockContext;
 import org.apache.cocoon.xml.LoggingContentHandler;
 import org.apache.cocoon.xml.SaxBuffer;
-import org.apache.excalibur.source.ModifiableSource;
-import org.apache.excalibur.source.ModifiableTraversableSource;
 import org.apache.excalibur.source.Source;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.TraversableSource;
 
 /**
  * TODO describe class
  * 
  * @author <a href="mailto:unico@apache.org">Unico Hommes</a> 
  */
-public class CachingSourceTestCase extends ExcaliburTestCase {
-    
-    public CachingSourceTestCase(String name) {
-        super(name);
-    }
+public class CachingSourceTestCase extends ContainerTestCase {
     
     public void testResolveURI() throws Exception {
         
         SourceResolver resolver = (SourceResolver) lookup(SourceResolver.ROLE);
         
         String scheme = "async-caching";
-        String uri = "resource://org/apache/cocoon/components/" +
            "source/impl/cachingsourcetest.xml?foo=bar";
+        String uri = "resource://org/apache/cocoon/components/" +
+            "source/impl/cachingsourcetest.xml?foo=bar";
         
         // resolve CachingSource
         Source source = resolver.resolveURI(
@@ -124,7 +114,7 @@
         
         SaxBuffer saxbuffer = new SaxBuffer();
         LoggingContentHandler handler = new LoggingContentHandler("test",saxbuffer);
-        handler.enableLogging(new LogKitLogger(getLogger().getChildLogger("handler")));
+        handler.enableLogging(getLogger().getChildLogger("handler"));
         source.toSAX(handler);
     }
     

Modified: cocoon/trunk/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
(original)
+++ cocoon/trunk/src/blocks/webdav/test/org/apache/cocoon/components/source/impl/WebDAVSourceTestCase.java
Sun Oct 24 10:36:28 2004
@@ -15,22 +15,14 @@
  */
 package org.apache.cocoon.components.source.impl;
 
-import java.io.InputStream;
-import java.io.OutputStream;
-import java.util.Iterator;
-
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-import org.apache.cocoon.components.source.impl.WebDAVSource;
-import org.apache.commons.httpclient.HttpURL;
-import org.apache.excalibur.source.ModifiableTraversableSource;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.excalibur.source.SourceResolver;
-import org.apache.excalibur.source.TraversableSource;
 import org.apache.webdav.lib.WebdavResource;
 
 /**
- * @version $Id: WebDAVSourceTestCase.java,v 1.4 2004/06/29 16:10:55 unico Exp $
+ * @version $Id$
  */
-public class WebDAVSourceTestCase extends ExcaliburTestCase {
+public class WebDAVSourceTestCase extends ContainerTestCase {
     
     private String m_scheme = "webdav";
     private String m_credentials = "usr:pwd";
@@ -41,10 +33,6 @@
     private String m_secure = m_scheme + "://" + m_authority + m_path + m_name;
     private String m_options = "?cocoon:webdav-action=" + WebdavResource.NOACTION + "&cocoon:webdav-depth=0";
     
-    
-    public WebDAVSourceTestCase(String name) {
-        super(name);
-    }
     
     public void testResolve() throws Exception {
         SourceResolver resolver = (SourceResolver) lookup(SourceResolver.ROLE);

Modified: cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -25,9 +25,7 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.woody.Constants;
 import org.apache.cocoon.xml.dom.DOMBuilder;
 import org.apache.excalibur.source.impl.ResourceSource;
@@ -37,29 +35,19 @@
 
 /**
  * Test case for Woody's DynamicSelectionList datatype.
- * @version CVS $Id: DynamicSelectionListTestCase.java,v 1.6 2004/03/09 13:54:21 reinhard
Exp $
+ * @version CVS $Id$
  */
-public class DynamicSelectionListTestCase extends ExcaliburTestCase {
+public class DynamicSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public DynamicSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -70,7 +58,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }
@@ -88,7 +76,7 @@
         Element datatypeElement = (Element) sourceDoc.getElementsByTagNameNS(Constants.WD_NS,
"convertor").item(0);
         Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
         DynamicSelectionList list = 
-            new DynamicSelectionList(datatype, null, serviceManager);
+            new DynamicSelectionList(datatype, null, this.getManager());
         list.generateSaxFragment(dest, Locale.ENGLISH, source);
         ResourceSource expectedSource =
             new ResourceSource("resource://org/apache/cocoon/woody/datatype/DynamicSelectionListTestCase.dest.xml");

Modified: cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/EnumSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/EnumSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/EnumSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -25,9 +25,7 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.transformation.I18nTransformer;
 import org.apache.cocoon.woody.Constants;
 import org.apache.cocoon.woody.datatype.typeimpl.EnumType;
@@ -38,29 +36,19 @@
 
 /**
  * Test case for Woody's DynamicSelectionList datatype.
- * @version CVS $Id: EnumSelectionListTestCase.java,v 1.4 2004/03/09 13:54:21 reinhard Exp
$
+ * @version CVS $Id$
  */
-public class EnumSelectionListTestCase extends ExcaliburTestCase {
+public class EnumSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public EnumSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -71,7 +59,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }

Modified: cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/FlowJXPathSelectionListTestCase.java
==============================================================================
--- cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/FlowJXPathSelectionListTestCase.java
(original)
+++ cocoon/trunk/src/blocks/woody/test/org/apache/cocoon/woody/datatype/FlowJXPathSelectionListTestCase.java
Sun Oct 24 10:36:28 2004
@@ -29,13 +29,11 @@
 import javax.xml.transform.dom.DOMSource;
 import javax.xml.transform.stream.StreamResult;
 
-import org.apache.avalon.excalibur.testcase.ExcaliburTestCase;
 import org.apache.avalon.framework.context.Context;
 import org.apache.avalon.framework.context.DefaultContext;
-import org.apache.avalon.framework.service.ServiceManager;
-import org.apache.avalon.framework.service.WrapperServiceManager;
 import org.apache.cocoon.components.ContextHelper;
 import org.apache.cocoon.components.flow.FlowHelper;
+import org.apache.cocoon.core.container.ContainerTestCase;
 import org.apache.cocoon.environment.ObjectModelHelper;
 import org.apache.cocoon.environment.Request;
 import org.apache.cocoon.environment.mock.MockRequest;
@@ -49,29 +47,19 @@
 
 /**
  * Test case for Woody's FlowModelSelectionList datatype.
- * @version CVS $Id: FlowJXPathSelectionListTestCase.java,v 1.6 2004/04/26 21:26:34 bruno
Exp $
+ * @version CVS $Id$
  */
-public class FlowJXPathSelectionListTestCase extends ExcaliburTestCase {
+public class FlowJXPathSelectionListTestCase extends ContainerTestCase {
 
-    protected ServiceManager serviceManager;
     protected DatatypeManager datatypeManager;
     protected DocumentBuilder parser;
 
-    /**
-     * Construct a new test case.
-     * @param name The test case's name.
-     */
-    public FlowJXPathSelectionListTestCase(String name) {
-        super(name);
-    }
-
     /* (non-Javadoc)
      * @see junit.framework.TestCase#setUp()
      */
     protected void setUp() throws Exception {
         super.setUp();
-        serviceManager = new WrapperServiceManager(manager); 
-        datatypeManager = (DatatypeManager) serviceManager.lookup(DatatypeManager.ROLE);
+        datatypeManager = (DatatypeManager) this.lookup(DatatypeManager.ROLE);
         DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
         factory.setNamespaceAware(true);
         parser = factory.newDocumentBuilder();
@@ -82,7 +70,7 @@
      */
     protected void tearDown() throws Exception {
         if (datatypeManager != null) {
-            serviceManager.release(datatypeManager);
+            this.release(datatypeManager);
         }
         super.tearDown();
     }

Modified: cocoon/trunk/tools/targets/ide-build.xml
==============================================================================
--- cocoon/trunk/tools/targets/ide-build.xml	(original)
+++ cocoon/trunk/tools/targets/ide-build.xml	Sun Oct 24 10:36:28 2004
@@ -58,6 +58,7 @@
       <!-- blocks source dirs -->
       <dirset dir="${blocks}">
         <include name="*/java"/>
+        <include name="*/test"/>
         <include name="*/java${target.vm}"/>
       </dirset>
     </path>

Mime
View raw message