Package org.apache.archiva.metadata.repository

Examples of org.apache.archiva.metadata.repository.RepositorySessionFactory


        metadataRepository = (MetadataRepository) metadataRepositoryControl.getMock();

        RepositorySession repositorySession = mock( RepositorySession.class );
        when( repositorySession.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory repositorySessionFactory = mock( RepositorySessionFactory.class );
        when( repositorySessionFactory.createSession() ).thenReturn( repositorySession );

        listenerControl = MockControl.createControl( RepositoryListener.class );
        listener = (RepositoryListener) listenerControl.getMock();

        roleManagerControl = MockControl.createControl( RoleManager.class );
View Full Code Here


        metadataRepository = (MetadataRepository) metadataRepositoryControl.getMock();

        repositorySession = mock( RepositorySession.class );
        when( repositorySession.getResolver() ).thenReturn( metadataResolver );
        when( repositorySession.getRepository() ).thenReturn( metadataRepository );
        RepositorySessionFactory repositorySessionFactory = mock( RepositorySessionFactory.class );
        when( repositorySessionFactory.createSession() ).thenReturn( repositorySession );

        searchService = new SearchServiceImpl( userRepos, repositorySessionFactory, search );
    }
View Full Code Here

        metadataRepository = mock( MetadataRepository.class );

        RepositorySession session = mock( RepositorySession.class );
        when( session.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory factory = applicationContext.getBean( RepositorySessionFactory.class );
        //(RepositorySessionFactory) lookup( RepositorySessionFactory.class );
        when( factory.createSession() ).thenReturn( session );

        when( pathTranslator.getArtifactForPath( TEST_REPO, TEST_FILE ) ).thenReturn( TEST_METADATA );
    }
View Full Code Here

    @Override
    protected RepositorySessionFactory createInstance()
        throws Exception
    {
        RepositorySessionFactory repositorySessionFactory =
            getBeanFactory().getBean( "repositorySessionFactory#" + this.beanId, RepositorySessionFactory.class );
        logger.info( "create RepositorySessionFactory instance of {}", repositorySessionFactory.getClass().getName() );
        return repositorySessionFactory;
    }
View Full Code Here

        metadataRepository = mock( MetadataRepository.class );

        RepositorySession session = mock( RepositorySession.class );
        when( session.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory factory = applicationContext.getBean( RepositorySessionFactory.class );
        //(RepositorySessionFactory) lookup( RepositorySessionFactory.class );
        when( factory.createSession() ).thenReturn( session );

        when( pathTranslator.getArtifactForPath( TEST_REPO, TEST_FILE ) ).thenReturn( TEST_METADATA );
    }
View Full Code Here

        metadataRepository = mock( MetadataRepository.class );

        RepositorySession session = mock( RepositorySession.class );
        when( session.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory factory = applicationContext.getBean( RepositorySessionFactory.class );
        //(RepositorySessionFactory) lookup( RepositorySessionFactory.class );
        when( factory.createSession() ).thenReturn( session );

        when( pathTranslator.getArtifactForPath( TEST_REPO, TEST_FILE ) ).thenReturn( TEST_METADATA );
    }
View Full Code Here

        metadataRepository = (MetadataRepository) metadataRepositoryControl.getMock();

        RepositorySession repositorySession = mock( RepositorySession.class );
        when( repositorySession.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory repositorySessionFactory = mock( RepositorySessionFactory.class );
        when( repositorySessionFactory.createSession() ).thenReturn( repositorySession );

        listenerControl = MockControl.createControl( RepositoryListener.class );
        listener = (RepositoryListener) listenerControl.getMock();

        roleManagerControl = MockControl.createControl( RoleManager.class );
View Full Code Here

        metadataRepository = mock( MetadataRepository.class );

        RepositorySession session = mock( RepositorySession.class );
        when( session.getRepository() ).thenReturn( metadataRepository );

        RepositorySessionFactory factory = applicationContext.getBean( RepositorySessionFactory.class );
        //(RepositorySessionFactory) lookup( RepositorySessionFactory.class );
        when( factory.createSession() ).thenReturn( session );

        when( pathTranslator.getArtifactForPath( TEST_REPO, TEST_FILE ) ).thenReturn( TEST_METADATA );
    }
View Full Code Here

TOP

Related Classes of org.apache.archiva.metadata.repository.RepositorySessionFactory

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.