Package org.apache.maven.archiva.reporting.model

Examples of org.apache.maven.archiva.reporting.model.ArtifactResults


    public int getNumFailures()
    {
        int count = 0;
        for ( Iterator it = getIterator(); it.hasNext(); )
        {
            ArtifactResults results = (ArtifactResults) it.next();
            count += results.getFailures().size();
        }
        return count;
    }
View Full Code Here


    public int getNumNotices()
    {
        int count = 0;
        for ( Iterator it = getIterator(); it.hasNext(); )
        {
            ArtifactResults results = (ArtifactResults) it.next();
            count += results.getNotices().size();
        }
        return count;
    }
View Full Code Here

    public int getNumWarnings()
    {
        int count = 0;
        for ( Iterator it = getIterator(); it.hasNext(); )
        {
            ArtifactResults results = (ArtifactResults) it.next();
            count += results.getWarnings().size();
        }
        return count;
    }
View Full Code Here

        assertEquals( "warnings count", 0, database.getNumWarnings() );
        assertEquals( "check no notices", 0, database.getNumNotices() );

        Iterator failures = database.getArtifactIterator();
        assertTrue( "check there is a failure", failures.hasNext() );
        ArtifactResults results = (ArtifactResults) failures.next();
        failures = results.getFailures().iterator();
        assertTrue( "check there is a failure", failures.hasNext() );
        ResultReason result = (ResultReason) failures.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "Single Failure Reason", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

        assertEquals( "warnings count", 0, database.getNumWarnings() );
        assertEquals( "check no notices", 0, database.getNumNotices() );

        Iterator failures = database.getArtifactIterator();
        assertTrue( "check there is a failure", failures.hasNext() );
        ArtifactResults results = (ArtifactResults) failures.next();
        failures = results.getFailures().iterator();
        assertTrue( "check there is a failure", failures.hasNext() );
        ResultReason result = (ResultReason) failures.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "First Failure Reason", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

        assertEquals( "warnings count", 1, database.getNumWarnings() );
        assertEquals( "check no notices", 0, database.getNumNotices() );

        Iterator warnings = database.getArtifactIterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ArtifactResults results = (ArtifactResults) warnings.next();
        warnings = results.getWarnings().iterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ResultReason result = (ResultReason) warnings.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "Single Warning Message", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

        assertEquals( "warnings count", 2, database.getNumWarnings() );
        assertEquals( "check no notices", 0, database.getNumNotices() );

        Iterator warnings = database.getArtifactIterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ArtifactResults results = (ArtifactResults) warnings.next();
        warnings = results.getWarnings().iterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ResultReason result = (ResultReason) warnings.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "First Warning", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

        assertEquals( "warnings count", 0, database.getNumWarnings() );
        assertEquals( "check notices", 1, database.getNumNotices() );

        Iterator warnings = database.getArtifactIterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ArtifactResults results = (ArtifactResults) warnings.next();
        warnings = results.getNotices().iterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ResultReason result = (ResultReason) warnings.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "Single Notice Message", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

        assertArtifactResults( artifactIterator, artifact );
    }

    private static void assertArtifactResults( Iterator artifactIterator, Artifact artifact )
    {
        ArtifactResults results = (ArtifactResults) artifactIterator.next();
        assertEquals( artifact.getArtifactId(), results.getArtifactId() );
        assertEquals( artifact.getGroupId(), results.getGroupId() );
        assertEquals( artifact.getVersion(), results.getVersion() );
        assertFalse( artifact.getVersion().indexOf( "SNAPSHOT" ) >= 0 );
        assertEquals( 1, results.getNotices().size() );
        Iterator i = results.getNotices().iterator();
        ResultReason result = (ResultReason) i.next();
        assertEquals( "old-snapshot-artifact", result.getProcessor() );
    }
View Full Code Here

        assertEquals( "warnings count", 0, database.getNumWarnings() );
        assertEquals( "check no notices", 2, database.getNumNotices() );

        Iterator warnings = database.getArtifactIterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ArtifactResults results = (ArtifactResults) warnings.next();
        warnings = results.getNotices().iterator();
        assertTrue( "check there is a failure", warnings.hasNext() );
        ResultReason result = (ResultReason) warnings.next();
        assertArtifact( results );
        assertEquals( "check failure reason", "First Notice", result.getReason() );
        assertEquals( "check failure parameters", PROCESSOR, result.getProcessor() );
View Full Code Here

TOP

Related Classes of org.apache.maven.archiva.reporting.model.ArtifactResults

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.