Examples of queryArtifacts()


Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // scan using the really long previous duration
        taskExecutor.executeTask( repoTask );

        // check no artifacts processed
        ArtifactDAO adao = dao.getArtifactDAO();
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected. One new artifact should have been found.", 1,
                      unprocessedResultList.size() );

        // check correctness of new stats
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        dao.getRepositoryContentStatisticsDAO().saveRepositoryContentStatistics( stats );

        taskExecutor.executeTask( repoTask );

        ArtifactDAO adao = dao.getArtifactDAO();
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );

        assertNotNull( unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
    }
}
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        ArchivaArtifact artifact = adao.getArtifact( "javax.sql", "jdbc", "2.0", null, "jar", repo.getId() );

        assertNotNull( artifact );

        // Test for artifact existance.
        List<ArchivaArtifact> artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        List<ArchivaArtifact> artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for unprocessed artifacts.
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );
        assertNotNull( "Unprocessed Results should not be null.", unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 1, unprocessedResultList.size() );

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // Execute the database task.
        DatabaseTask dataTask = new DatabaseTask();
        taskExecutor.executeTask( dataTask );
       
        // Test for artifact existance.
        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List<ArchivaArtifact> processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        artifactList = adao.queryArtifacts( null );
        assertNotNull( "Artifact list should not be null.", artifactList );
        assertEquals( "Artifact list size", 1, artifactList.size() );
       
        // Test for processed artifacts.
        List<ArchivaArtifact> processedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( true ) );
        assertNotNull( "Processed Results should not be null.", processedResultList );
        assertEquals( "Incorrect number of processed artifacts detected.", 1, processedResultList.size() );
    }
   
    protected ManagedRepositoryConfiguration createRepository( String id, String name, File location )
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        repoTask.setRepositoryId( TEST_REPO_ID );

        taskExecutor.executeTask( repoTask );

        ArtifactDAO adao = dao.getArtifactDAO();
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );

        assertNotNull( unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected.", 8, unprocessedResultList.size() );
    }
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        taskExecutor.executeTask( repoTask );

        // check no artifacts processed
        ArtifactDAO adao = dao.getArtifactDAO();
        List<ArchivaArtifact> unprocessedResultList = adao.queryArtifacts( new ArtifactsProcessedConstraint( false ) );

        assertNotNull( unprocessedResultList );
        assertEquals( "Incorrect number of unprocessed artifacts detected. No new artifacts should have been found.", 0,
                      unprocessedResultList.size() );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        assertNotNull( savedArtifact );
        String savedKeyId = JDOHelper.getObjectId( savedArtifact.getModel() ).toString();
        assertEquals( "org.apache.maven.archiva:archiva-test-module:1.0::jar:testrepo", savedKeyId );

        // Test that something has been saved.
        List<ArchivaArtifact> artifacts = artiDao.queryArtifacts( null );
        assertNotNull( artifacts );
        assertEquals( 1, artifacts.size() );

        // Test that retrieved object is what we expect.
        ArchivaArtifact firstArtifact = (ArchivaArtifact) artifacts.get( 0 );
View Full Code Here

Examples of org.apache.maven.archiva.database.ArtifactDAO.queryArtifacts()

        // Change value and save.
        savedArtifact.getModel().setOrigin( "changed" );
        artiDao.saveArtifact( savedArtifact );

        // Test that only 1 object is saved.
        assertEquals( 1, artiDao.queryArtifacts( null ).size() );

        // Get the specific artifact.
        ArchivaArtifact actualArtifact = artiDao.getArtifact( "org.apache.maven.archiva", "archiva-test-module", "1.0",
                                                              null, "jar", "testrepo" );
        assertNotNull( actualArtifact );
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.