use of jetbrains.buildServer.serverSide.artifacts.BuildArtifacts in project teamcity-torrent-plugin by JetBrains.
the class ServerTorrentsSeederTest method announceBuildArtifactsTest.
public void announceBuildArtifactsTest() {
Path path = Paths.get("tmp");
Mockery m = new Mockery();
BuildArtifacts buildArtifacts = m.mock(BuildArtifacts.class);
ArtifactsCollector artifactsCollector = m.mock(ArtifactsCollector.class);
ArtifactProcessor artifactProcessor = m.mock(ArtifactProcessor.class);
UnusedTorrentFilesRemover unusedTorrentFilesRemover = m.mock(UnusedTorrentFilesRemover.class);
List<BuildArtifact> artifactsCollectorResult = Collections.emptyList();
m.checking(new Expectations() {
{
one(artifactProcessor).processArtifacts(with(artifactsCollectorResult));
one(artifactsCollector).collectArtifacts(with(buildArtifacts));
will(returnValue(artifactsCollectorResult));
one(unusedTorrentFilesRemover).removeUnusedTorrents(with(artifactsCollectorResult), with(path));
}
});
myTorrentsSeeder.announceBuildArtifacts(path, buildArtifacts, artifactsCollector, artifactProcessor, unusedTorrentFilesRemover);
m.assertIsSatisfied();
}
Aggregations