Package org.apache.maven.archiva.consumers

Examples of org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer


    }

    public void testReleasedSnapshotsWereCleaned()
        throws Exception
    {
        KnownRepositoryContentConsumer repoPurgeConsumer =
            (KnownRepositoryContentConsumer) lookup( KnownRepositoryContentConsumer.class,
                                                     "repo-purge-consumer-by-days-old" );

        ManagedRepositoryConfiguration repoConfiguration = getRepoConfiguration( TEST_REPO_ID, TEST_REPO_NAME );
        repoConfiguration.setDeleteReleasedSnapshots( true );
        addRepoToConfiguration( "days-old", repoConfiguration );

        repoPurgeConsumer.beginScan( repoConfiguration, null );

        String repoRoot = prepareTestRepos();

        repoPurgeConsumer.processFile( CleanupReleasedSnapshotsRepositoryPurgeTest.PATH_TO_RELEASED_SNAPSHOT_IN_SAME_REPO );

        String projectRoot = repoRoot + "/org/apache/maven/plugins/maven-plugin-plugin";

        // check if the snapshot was removed
        assertDeleted( projectRoot + "/2.3-SNAPSHOT" );
View Full Code Here


        assertNotNull( "Known Consumer Map should not be null", knownConsumerMap );
        assertEquals( "Known Consumer Map.size", expectedSelectedKnownIds.length, knownConsumerMap.size() );

        for ( String expectedId : expectedSelectedKnownIds )
        {
            KnownRepositoryContentConsumer consumer = knownConsumerMap.get( expectedId );
            assertNotNull( "Known[" + expectedId + "] should not be null.", consumer );
            assertEquals( "Known[" + expectedId + "].id", expectedId, consumer.getId() );
        }
    }
View Full Code Here

    public void testExecution()
        throws Exception
    {
        MockControl knownControl = MockControl.createNiceControl( KnownRepositoryContentConsumer.class );
        RepositoryContentConsumers consumers = lookupRepositoryConsumers();
        KnownRepositoryContentConsumer selectedKnownConsumer = (KnownRepositoryContentConsumer) knownControl.getMock();
        KnownRepositoryContentConsumer unselectedKnownConsumer =
            (KnownRepositoryContentConsumer) MockControl.createNiceControl(
                KnownRepositoryContentConsumer.class ).getMock();

        consumers.setApplicationContext(new MockApplicationContext(Arrays.asList( selectedKnownConsumer, unselectedKnownConsumer ), null));
View Full Code Here

        assertNotNull( "Known Consumer Map should not be null", knownConsumerMap );
        assertEquals( "Known Consumer Map.size", expectedSelectedKnownIds.length, knownConsumerMap.size() );

        for ( String expectedId : expectedSelectedKnownIds )
        {
            KnownRepositoryContentConsumer consumer = knownConsumerMap.get( expectedId );
            assertNotNull( "Known[" + expectedId + "] should not be null.", consumer );
            assertEquals( "Known[" + expectedId + "].id", expectedId, consumer.getId() );
        }
    }
View Full Code Here

    public void testExecution()
        throws Exception
    {
        MockControl knownControl = MockControl.createNiceControl( KnownRepositoryContentConsumer.class );
        RepositoryContentConsumers consumers = lookupRepositoryConsumers();
        KnownRepositoryContentConsumer selectedKnownConsumer = (KnownRepositoryContentConsumer) knownControl.getMock();
        KnownRepositoryContentConsumer unselectedKnownConsumer =
            (KnownRepositoryContentConsumer) MockControl.createNiceControl(
                KnownRepositoryContentConsumer.class ).getMock();

        consumers.setApplicationContext(new MockApplicationContext(Arrays.asList( selectedKnownConsumer, unselectedKnownConsumer ), null));
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.consumers.KnownRepositoryContentConsumer

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.