Search in sources :

Example 1 with BuildResultPushManager

use of org.jboss.pnc.bpm.causeway.BuildResultPushManager in project pnc by project-ncl.

the class BuildResultPushManagerTest method setUp.

@Before
public void setUp() throws CoreException, GerritException {
    when(buildConfigurationAuditedRepository.queryById(any(IdRev.class))).thenReturn(buildConfigurationAudited);
    when(causewayClient.importBuild(any(), any())).thenReturn(true);
    when(gerrit.generateDownloadUrlWithGerritGitweb(any(), any())).thenReturn("https://example.com/foo.tar.gz");
    buildRecordRepository = new BuildRecordRepositoryMock();
    buildRecordPushResultRepository = new BuildRecordPushResultRepositoryMock();
    releaseManager = new BuildResultPushManager(buildConfigurationAuditedRepository, buildRecordPushResultRepository, null, new InProgress(), buildRecordPushResultRestEvent, artifactRepository, gerrit, causewayClient);
}
Also used : BuildRecordRepositoryMock(org.jboss.pnc.mock.repository.BuildRecordRepositoryMock) BuildRecordPushResultRepositoryMock(org.jboss.pnc.mock.repository.BuildRecordPushResultRepositoryMock) BuildResultPushManager(org.jboss.pnc.bpm.causeway.BuildResultPushManager) InProgress(org.jboss.pnc.bpm.causeway.InProgress) IdRev(org.jboss.pnc.model.IdRev) Before(org.junit.Before)

Aggregations

BuildResultPushManager (org.jboss.pnc.bpm.causeway.BuildResultPushManager)1 InProgress (org.jboss.pnc.bpm.causeway.InProgress)1 BuildRecordPushResultRepositoryMock (org.jboss.pnc.mock.repository.BuildRecordPushResultRepositoryMock)1 BuildRecordRepositoryMock (org.jboss.pnc.mock.repository.BuildRecordRepositoryMock)1 IdRev (org.jboss.pnc.model.IdRev)1 Before (org.junit.Before)1