DownloadReport dr = resolver.download(new Artifact[] {new DefaultArtifact(mrid, rmr.getPublicationDate(), mrid.getName(), "jar", "jar")}, _ivy, _cache); assertEquals(1, dr.getArtifactsReports(DownloadStatus.SUCCESSFUL).length);
DownloadReport dr = resolver.download(rmr.getDescriptor().getAllArtifacts(), _ivy, _cache); assertEquals(2, dr.getArtifactsReports(DownloadStatus.SUCCESSFUL).length);
    public void testChecksum() throws Exception {        FileSystemResolver resolver = new FileSystemResolver();        resolver.setName("test");        resolver.setIvy(_ivy);                resolver.addIvyPattern("test/repositories/checksums/[module]/[artifact]-[revision].[ext]");        resolver.addArtifactPattern("test/repositories/checksums/[module]/[artifact]-[revision].[ext]");                resolver.setChecksums("sha1, md5");        ModuleRevisionId mrid = ModuleRevisionId.newInstance("test", "allright", "1.0");        ResolvedModuleRevision rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data);        assertNotNull(rmr);        DownloadReport dr = resolver.download(new Artifact[] {new DefaultArtifact(mrid, rmr.getPublicationDate(), mrid.getName(), "jar", "jar")}, _ivy, _cache);        assertEquals(1, dr.getArtifactsReports(DownloadStatus.SUCCESSFUL).length);        resolver.setChecksums("md5");        mrid = ModuleRevisionId.newInstance("test", "badivycs", "1.0");        rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data);        assertNull(rmr);        resolver.setChecksums("none");        rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data);        assertNotNull(rmr);        dr = resolver.download(new Artifact[] {new DefaultArtifact(mrid, rmr.getPublicationDate(), mrid.getName(), "jar", "jar")}, _ivy, _cache);        assertEquals(1, dr.getArtifactsReports(DownloadStatus.SUCCESSFUL).length);        resolver.setChecksums("md5");        mrid = ModuleRevisionId.newInstance("test", "badartcs", "1.0");        rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data);        assertNotNull(rmr);        dr = resolver.download(new Artifact[] {new DefaultArtifact(mrid, rmr.getPublicationDate(), mrid.getName(), "jar", "jar")}, _ivy, _cache);        assertEquals(1, dr.getArtifactsReports(DownloadStatus.FAILED).length);                resolver.setChecksums("");        rmr = resolver.getDependency(new DefaultDependencyDescriptor(mrid, false), _data);        assertNotNull(rmr);        dr = resolver.download(new Artifact[] {new DefaultArtifact(mrid, rmr.getPublicationDate(), mrid.getName(), "jar", "jar")}, _ivy, _cache);        assertEquals(1, dr.getArtifactsReports(DownloadStatus.SUCCESSFUL).length);    }