Search in sources :

Example 1 with EventPostService

use of net.nemerosa.ontrack.model.events.EventPostService in project ontrack by nemerosa.

the class StructureServiceImplTest method before.

@Before
public void before() {
    SecurityService securityService = mock(SecurityService.class);
    ValidationRunStatusService validationRunStatusService = mock(ValidationRunStatusService.class);
    structureRepository = mock(StructureRepository.class);
    EventPostService eventService = mock(EventPostService.class);
    EventFactory eventFactory = mock(EventFactory.class);
    ExtensionManager extensionManager = mock(ExtensionManager.class);
    PropertyService propertyService = mock(PropertyService.class);
    PredefinedPromotionLevelService predefinedPromotionLevelService = mock(PredefinedPromotionLevelService.class);
    PredefinedValidationStampService predefinedValidationStampService = mock(PredefinedValidationStampService.class);
    DecorationService decorationService = mock(DecorationService.class);
    ProjectFavouriteService projectFavouriteService = mock(ProjectFavouriteService.class);
    service = new StructureServiceImpl(securityService, eventService, eventFactory, validationRunStatusService, structureRepository, extensionManager, propertyService, predefinedPromotionLevelService, predefinedValidationStampService, decorationService, projectFavouriteService);
    // Model
    Project project = Project.of(nd("P", "Project")).withId(ID.of(1));
    Branch branch = Branch.of(project, nd("B", "Branch")).withId(ID.of(1));
    copper = PromotionLevel.of(branch, nd("COPPER", "")).withId(ID.of(1));
    build = Build.of(branch, nd("1", "Build 1"), Signature.of("test")).withId(ID.of(1));
}
Also used : PredefinedPromotionLevelService(net.nemerosa.ontrack.model.settings.PredefinedPromotionLevelService) EventPostService(net.nemerosa.ontrack.model.events.EventPostService) EventFactory(net.nemerosa.ontrack.model.events.EventFactory) PredefinedValidationStampService(net.nemerosa.ontrack.model.settings.PredefinedValidationStampService) StructureRepository(net.nemerosa.ontrack.repository.StructureRepository) ExtensionManager(net.nemerosa.ontrack.extension.api.ExtensionManager) SecurityService(net.nemerosa.ontrack.model.security.SecurityService) Before(org.junit.Before)

Example 2 with EventPostService

use of net.nemerosa.ontrack.model.events.EventPostService in project ontrack by nemerosa.

the class ConfigurationServiceTest method before.

@Before
public void before() {
    configurationRepository = mock(ConfigurationRepository.class);
    securityService = mock(SecurityService.class);
    encryptionService = mock(EncryptionService.class);
    eventPostService = mock(EventPostService.class);
    eventFactory = mock(EventFactory.class);
    OntrackConfigProperties ontrackConfigProperties = new OntrackConfigProperties();
    configurationService = new TestConfigurationServiceImpl(configurationRepository, securityService, encryptionService, eventPostService, eventFactory, ontrackConfigProperties);
}
Also used : SecurityService(net.nemerosa.ontrack.model.security.SecurityService) EncryptionService(net.nemerosa.ontrack.model.security.EncryptionService) EventPostService(net.nemerosa.ontrack.model.events.EventPostService) EventFactory(net.nemerosa.ontrack.model.events.EventFactory) TestConfigurationServiceImpl(net.nemerosa.ontrack.extension.api.support.TestConfigurationServiceImpl) ConfigurationRepository(net.nemerosa.ontrack.model.support.ConfigurationRepository) OntrackConfigProperties(net.nemerosa.ontrack.model.support.OntrackConfigProperties) Before(org.junit.Before)

Aggregations

EventFactory (net.nemerosa.ontrack.model.events.EventFactory)2 EventPostService (net.nemerosa.ontrack.model.events.EventPostService)2 SecurityService (net.nemerosa.ontrack.model.security.SecurityService)2 Before (org.junit.Before)2 ExtensionManager (net.nemerosa.ontrack.extension.api.ExtensionManager)1 TestConfigurationServiceImpl (net.nemerosa.ontrack.extension.api.support.TestConfigurationServiceImpl)1 EncryptionService (net.nemerosa.ontrack.model.security.EncryptionService)1 PredefinedPromotionLevelService (net.nemerosa.ontrack.model.settings.PredefinedPromotionLevelService)1 PredefinedValidationStampService (net.nemerosa.ontrack.model.settings.PredefinedValidationStampService)1 ConfigurationRepository (net.nemerosa.ontrack.model.support.ConfigurationRepository)1 OntrackConfigProperties (net.nemerosa.ontrack.model.support.OntrackConfigProperties)1 StructureRepository (net.nemerosa.ontrack.repository.StructureRepository)1