commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rsi...@apache.org
Subject cvs commit: jakarta-commons/discovery/src/test/org/apache/commons/discovery TestAll.java
Date Fri, 23 Aug 2002 21:56:24 GMT
rsitze      2002/08/23 14:56:24

  Modified:    discovery/src/test/org/apache/commons/discovery TestAll.java
  Log:
  New and improved discovery.  Thanks & Kudos for Costins persistence..
  I'm starting to see the light.  Performance is down :-(  Function is up :-)
  
  
  Revision  Changes    Path
  1.9       +8 -6      jakarta-commons/discovery/src/test/org/apache/commons/discovery/TestAll.java
  
  Index: TestAll.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/discovery/src/test/org/apache/commons/discovery/TestAll.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- TestAll.java	14 Aug 2002 21:46:34 -0000	1.8
  +++ TestAll.java	23 Aug 2002 21:56:24 -0000	1.9
  @@ -68,9 +68,11 @@
   import junit.framework.Test;
   import junit.framework.TestCase;
   import junit.framework.TestSuite;
  -
  +import org.apache.commons.discovery.tools.DefaultClassHolder;
  +import org.apache.commons.discovery.tools.DiscoverSingleton;
   import org.apache.commons.discovery.tools.ManagedProperties;
  -
  +import org.apache.commons.discovery.tools.PropertiesHolder;
  +import org.apache.commons.discovery.tools.SPInterface;
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.apache.commons.logging.impl.LogFactoryImpl;
  @@ -237,10 +239,10 @@
           LogFactory factory = null;
           
           try {
  -            factory = (LogFactory)DiscoverSingleton.find((String)null /* groupContext */,
  -                                   LogFactory.class,
  -                                   LogFactory.FACTORY_PROPERTIES,
  -                                   LogFactory.FACTORY_DEFAULT);
  +            factory = (LogFactory)DiscoverSingleton.find(null,
  +                                   new SPInterface(LogFactory.class),
  +                                   new PropertiesHolder(LogFactory.FACTORY_PROPERTIES),
  +                                   new DefaultClassHolder(LogFactory.FACTORY_DEFAULT));
   
               assertTrue(factory.getClass().getName() + "!=" + LogFactoryImpl.class.getName(),
                          factory.getClass().getName().equals(LogFactoryImpl.class.getName()));
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message