Package org.apache.archiva.repository

Examples of org.apache.archiva.repository.RepositoryContentFactory


    public void setUp()
        throws Exception
    {
        super.setUp();

        RepositoryContentFactory factory =
            applicationContext.getBean( "repositoryContentFactory#cleanup-released-snapshots",
                                        RepositoryContentFactory.class );

        archivaConfiguration =
            applicationContext.getBean( "archivaConfiguration#cleanup-released-snapshots", ArchivaConfiguration.class );
View Full Code Here


        when( repositorySession.getRepository() ).thenReturn( repo );
        TestRepositorySessionFactory repositorySessionFactory =
            applicationContext.getBean( "repositorySessionFactory#test", TestRepositorySessionFactory.class );
        repositorySessionFactory.setRepositorySession( repositorySession );

        RepositoryContentFactory factory = mock( RepositoryContentFactory.class );

        action.setRepositoryFactory( factory );

        ManagedRepository config = new ManagedRepository();
        config.setId( TEST_REPO );
        config.setLocation( new File( "target/test-repo" ).getAbsolutePath() );

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config );
        when( factory.getManagedRepositoryContent( TEST_REPO ) ).thenReturn( content );

        ArchivaConfiguration archivaConfig = mock( ArchivaConfiguration.class );

        Configuration configuration = new Configuration();
        configuration.addManagedRepository(
            new BeanReplicator().replicateBean( config, ManagedRepositoryConfiguration.class ) );
        when( archivaConfig.getConfiguration() ).thenReturn( configuration );

        when( factory.getArchivaConfiguration() ).thenReturn( archivaConfig );

    }
View Full Code Here

    public void setUp()
        throws Exception
    {
        super.setUp();

        RepositoryContentFactory factory =
            applicationContext.getBean( "repositoryContentFactory#cleanup-released-snapshots",
                                        RepositoryContentFactory.class );

        archivaConfiguration =
            applicationContext.getBean( "archivaConfiguration#cleanup-released-snapshots", ArchivaConfiguration.class );
View Full Code Here

    public void setUp()
        throws Exception
    {
        super.setUp();

        RepositoryContentFactory factory =
            applicationContext.getBean( "repositoryContentFactory#cleanup-released-snapshots",
                                        RepositoryContentFactory.class );

        archivaConfiguration =
            applicationContext.getBean( "archivaConfiguration#cleanup-released-snapshots", ArchivaConfiguration.class );
View Full Code Here

    public void setUp()
        throws Exception
    {
        super.setUp();

        RepositoryContentFactory factory =
            applicationContext.getBean( "repositoryContentFactory#cleanup-released-snapshots",
                                        RepositoryContentFactory.class );

        archivaConfiguration =
            applicationContext.getBean( "archivaConfiguration#cleanup-released-snapshots", ArchivaConfiguration.class );
View Full Code Here

        when( repositorySession.getRepository() ).thenReturn( repo );
        TestRepositorySessionFactory repositorySessionFactory =
            applicationContext.getBean( "repositorySessionFactory#test", TestRepositorySessionFactory.class );
        repositorySessionFactory.setRepositorySession( repositorySession );

        RepositoryContentFactory factory = mock( RepositoryContentFactory.class );

        action.setRepositoryFactory( factory );

        ManagedRepository config = new ManagedRepository();
        config.setId( TEST_REPO );
        config.setLocation( new File( "target/test-repo" ).getAbsolutePath() );

        ManagedRepositoryContent content = new ManagedDefaultRepositoryContent();
        content.setRepository( config );
        when( factory.getManagedRepositoryContent( TEST_REPO ) ).thenReturn( content );

        ArchivaConfiguration archivaConfig = mock( ArchivaConfiguration.class );

        Configuration configuration = new Configuration();
        configuration.addManagedRepository(
            new BeanReplicator().replicateBean( config, ManagedRepositoryConfiguration.class ) );
        when( archivaConfig.getConfiguration() ).thenReturn( configuration );

        when( factory.getArchivaConfiguration() ).thenReturn( archivaConfig );

    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.repository.RepositoryContentFactory

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.