use of net.nemerosa.ontrack.extension.artifactory.ArtifactoryExtensionFeature in project ontrack by nemerosa.
the class ArtifactoryPromotionSyncServiceImplTest method syncBuildJobs_one_per_configured_branch.
@Test
public void syncBuildJobs_one_per_configured_branch() {
when(propertyService.hasProperty(branch, ArtifactoryPromotionSyncPropertyType.class)).thenReturn(true);
Property<ArtifactoryPromotionSyncProperty> property = Property.of(new ArtifactoryPromotionSyncPropertyType(new ArtifactoryExtensionFeature(), null), new ArtifactoryPromotionSyncProperty(null, "", "", 10));
when(propertyService.getProperty(branch, ArtifactoryPromotionSyncPropertyType.class)).thenReturn(property);
when(structureService.getProjectList()).thenReturn(Collections.singletonList(project));
when(structureService.getBranchesForProject(project.getId())).thenReturn(Collections.singletonList(branch));
// Gets the list of jobs
assertEquals(1, service.collectJobRegistrations().count());
}
Aggregations