@Test public void shouldReportNotModifiedWhenArtifactPublicationBeforeLastBuildOnSecondRun() { Collection<Artifact> artifacts = artifacts(new MockArtifact("foo.jar", EVEN_LONGER_AGO)); getMods(artifacts); List<Modification> secondRun = getMods(artifacts); assertEquals(0, secondRun.size()); }
@SuppressWarnings ("unchecked") Collection<Artifact> artifacts() throws IOException, ParseException { final Ivy ivy = Ivy.newInstance(); ivy.configure(ivySettings.toURI().toURL()); return ivy.resolve(ivyXml.toURI().toURL()).getArtifacts(); }
IvySourceControl extends FakeUserSourceControl { @SuppressWarnings ("unchecked") Collection<Artifact> artifacts() throws IOException, ParseException { final Ivy ivy = Ivy.newInstance(); ivy.configure(ivySettings.toURI().toURL()); return ivy.resolve(ivyXml.toURI().toURL()).getArtifacts(); } }
IvySourceControl extends FakeUserSourceControl { @SuppressWarnings ("unchecked") Collection<Artifact> artifacts() throws IOException, ParseException { final Ivy ivy = Ivy.newInstance(); ivy.configure(ivySettings.toURI().toURL()); return ivy.resolve(ivyXml.toURI().toURL()).getArtifacts(); }  }
IvySourceControl extends FakeUserSourceControl { @SuppressWarnings ("unchecked") Collection<Artifact> artifacts() throws IOException, ParseException { final Ivy ivy = Ivy.newInstance(); ivy.configure(ivySettings.toURI().toURL()); return ivy.resolve(ivyXml.toURI().toURL()).getArtifacts(); }  @Override List<Modification> getModifications(final Date lastBuild, final Date now); @Override void validate(); String getIvyXml(); void setIvyXml(final String ivyXml); void setIvySettings(final String ivySettings); String getIvySettings(); }
IvySourceControl extends FakeUserSourceControl { @SuppressWarnings ("unchecked") Collection<Artifact> artifacts() throws IOException, ParseException { final Ivy ivy = Ivy.newInstance(); ivy.configure(ivySettings.toURI().toURL()); return ivy.resolve(ivyXml.toURI().toURL()).getArtifacts(); }  @Override List<Modification> getModifications(final Date lastBuild, final Date now); @Override void validate(); String getIvyXml(); void setIvyXml(final String ivyXml); void setIvySettings(final String ivySettings); String getIvySettings();  }