Package org.apache.avalon.repository.provider

Examples of org.apache.avalon.repository.provider.InitialContext


        super( name );
    }

    public void testRepositoryBootstrap() throws Exception
    {
        InitialContext context =
          new DefaultInitialContext(
            getMavenRepositoryDirectory(),
            getDefaultHosts() );

        assertEquals(
          "cache",
          context.getInitialCacheDirectory(),
          getMavenRepositoryDirectory() );

        String[] defaults = getDefaultHosts();
        String[] hosts = context.getInitialHosts();
        assertNotNull( "hosts", hosts );
        assertEquals( "hosts count", defaults.length, hosts.length );

        for( int i=0; i<defaults.length; i++ )
        {
            assertEquals(
              "host", defaults[i], hosts[i] );
        }

        Factory factory = context.getInitialFactory();
        assertNotNull( factory );

        CacheManager manager = (CacheManager) factory.create() ;
        assertNotNull( manager ) ;
  
View Full Code Here

TOP

Related Classes of org.apache.avalon.repository.provider.InitialContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.