Package org.apache.archiva.metadata.repository

Examples of org.apache.archiva.metadata.repository.RepositorySessionFactory.createSession()


        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


        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 );
    }

    // MRM-1230
View Full Code Here

        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 );
    }

    @Test
View Full Code Here

        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 );
    }

    @Test
View Full Code Here

        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 );
    }

    @Test
View Full Code Here

        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

        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 );
    }

    @Test
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.