avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/repository/util/src/test/org/apache/avalon/repository/util RepositoryUtilsTest.java
Date Sun, 23 Nov 2003 02:26:01 GMT
mcconnell    2003/11/22 18:26:01

  Modified:    repository/api/src/java/org/apache/avalon/repository/criteria
                        Factory.java
               repository/test/src/test/org/apache/avalon/repository
                        LoaderTest.java
               repository/util/src/test/org/apache/avalon/repository/util
                        RepositoryUtilsTest.java
  Log:
  Move factory to a map to allow non-depednece on repository.
  
  Revision  Changes    Path
  1.2       +5 -2      avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/criteria/Factory.java
  
  Index: Factory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/api/src/java/org/apache/avalon/repository/criteria/Factory.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Factory.java	23 Nov 2003 02:00:43 -0000	1.1
  +++ Factory.java	23 Nov 2003 02:26:01 -0000	1.2
  @@ -50,6 +50,8 @@
   
   package org.apache.avalon.repository.criteria ;
   
  +import java.util.Map;
  +
   /**
    * A generic application factory.
    *
  @@ -67,8 +69,9 @@
   
      /**
       * Create a new instance of an application.
  +    * @param map the creatiob criteria
       * @return the application instance
       */
  -    Object create( Criteria criteria );
  +    Object create( Map map );
   
   }
  
  
  
  1.2       +4 -4      avalon-sandbox/repository/test/src/test/org/apache/avalon/repository/LoaderTest.java
  
  Index: LoaderTest.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/test/src/test/org/apache/avalon/repository/LoaderTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- LoaderTest.java	23 Nov 2003 02:00:43 -0000	1.1
  +++ LoaderTest.java	23 Nov 2003 02:26:01 -0000	1.2
  @@ -56,7 +56,7 @@
   
   import junit.framework.TestCase ;
   
  -import org.apache.avalon.repository.util.ArtifactFactory ;
  +import org.apache.avalon.repository.Artifact;
   import org.apache.avalon.repository.ClassicArtifact ;
   import org.apache.avalon.repository.util.DefaultRepositoryContext ;
   import org.apache.avalon.repository.meta.TargetMeta ;
  @@ -99,7 +99,7 @@
   
       public void testEmbeddingScenario() throws Exception
       {
  -        Artifact spec = ArtifactFactory.createArtifact( "test", "test" );
  +        Artifact spec = Artifact.createArtifact( "test", "test" );
           Attributes attributes = m_repository.getArtifactAttributes( spec );
           assertNotNull( "attributes-not-null", attributes );
   
  @@ -145,7 +145,7 @@
           // instantiate the application
           //
   
  -        Object app = factory.create( criteria );
  +        Object app = factory.create( criteria.getMap() );
           System.out.println( "APP: " + app );
       }
   
  
  
  
  1.2       +3 -1      avalon-sandbox/repository/util/src/test/org/apache/avalon/repository/util/RepositoryUtilsTest.java
  
  Index: RepositoryUtilsTest.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/util/src/test/org/apache/avalon/repository/util/RepositoryUtilsTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- RepositoryUtilsTest.java	20 Nov 2003 04:25:30 -0000	1.1
  +++ RepositoryUtilsTest.java	23 Nov 2003 02:26:01 -0000	1.2
  @@ -103,7 +103,9 @@
       final public void testGetAsAttributes() throws Exception
       {
           Properties l_props = 
  -            RepositoryUtils.getProperties( new URL( "http://www.ibiblio.org/maven/avalon-repository/propertiess/repository.properties"
) ) ;
  +            RepositoryUtils.getProperties( 
  +              new URL( 
  +                "http://www.ibiblio.org/maven/avalon-repository/propertiess/repository.properties"
) ) ;
           Attributes l_attrs = RepositoryUtils.getAsAttributes( l_props ) ;
           assertEquals( ".repository", l_attrs.get( "cache.dir" ).get( 0 ) ) ; 
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message