CVS: plexus-container-new/src/test/org/apache/plexus DefaultPlexusContainerTest.java,1.1.1.1,1.2 DefaultServiceB.java,1.2,1.3

[email protected]
Newsgroups gmane.comp.java.plexus.devel
Message-ID <[email protected]>
Update of /cvsroot/plexus/plexus-container-new/src/test/org/apache/plexus
In directory eng.werken.com:/tmp/cvs-serv7788/src/test/org/apache/plexus

Modified Files:
	DefaultPlexusContainerTest.java DefaultServiceB.java 
Log Message:
o Clarifying name of the container host.
o Using the context as the source of values for the configuration resource
  interpolation. As a result I cleaned up anything to do with configuration
  variables as this is redundant given the existence of the context.
o Created a simple adapter so that a context can be used as a Map in the
  InterpolationFilterReader.
o Added test cases for the ContextMapAdapter and the InterpolationFilterReader
  using the adapter.


Index: DefaultPlexusContainerTest.java
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/src/test/org/apache/plexus/DefaultPlexusContainerTest.java,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- DefaultPlexusContainerTest.java	29 Mar 2003 03:49:44 -0000	1.1.1.1
+++ DefaultPlexusContainerTest.java	27 Apr 2003 16:27:43 -0000	1.2
@@ -3,6 +3,7 @@
 import junit.framework.TestCase;
 
 import java.io.InputStream;
+import java.io.InputStreamReader;
 
 /**
  *  @author <a href="mailto:[email protected]">Jason van Zyl</a>
@@ -45,7 +46,7 @@
         System.setProperty( "plexus.home", System.getProperty( "basedir" ) + "/target/plexus-home" );
 
         DefaultPlexusContainer container = new DefaultPlexusContainer();
-        container.setConfigurationResource( configurationStream );
+        container.setConfigurationResource( new InputStreamReader( configurationStream  ) );
         container.initialize();
         container.start();
 
@@ -112,7 +113,7 @@
         assertEquals( true, serviceB1.initialize );
         assertEquals( true, serviceB1.start );
 
-        assertNotNull( serviceB1.getResourceManager() );
+        assertNotNull( serviceB1.getClassLoader() );
 
         // Retrieve another
         DefaultServiceB serviceB2 = (DefaultServiceB) container.getServiceRepository().lookup( ServiceB.ROLE );

Index: DefaultServiceB.java
===================================================================
RCS file: /cvsroot/plexus/plexus-container-new/src/test/org/apache/plexus/DefaultServiceB.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- DefaultServiceB.java	23 Apr 2003 03:57:13 -0000	1.2
+++ DefaultServiceB.java	27 Apr 2003 16:27:43 -0000	1.3
@@ -11,7 +11,6 @@
 import org.apache.avalon.framework.service.ServiceException;
 import org.apache.avalon.framework.service.ServiceManager;
 import org.apache.avalon.framework.service.Serviceable;
-import org.apache.plexus.classloader.ResourceManager;
 import org.apache.plexus.logging.AbstractLogEnabled;
 
 /** This service implements all the start phases:
@@ -36,7 +35,7 @@
     boolean start;
     boolean stop;
 
-    ResourceManager resourceManager;
+    ClassLoader classLoader;
 
     // ----------------------------------------------------------------------
     // Lifecylce Management
@@ -52,7 +51,7 @@
     {
         contextualize = true;
 
-        resourceManager = (ResourceManager) context.get( "plexus:resource-manager" );
+        classLoader = (ClassLoader) context.get( "common.classloader" );
     }
 
     public void service( ServiceManager serviceManager )
@@ -84,9 +83,9 @@
         stop = true;
     }
 
-    public ResourceManager getResourceManager()
+    public ClassLoader getClassLoader()
     {
-        return resourceManager;
+        return classLoader;
     }
 }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.