Search in sources :

Example 16 with Integration

use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.

the class IntegrationRepositoryTest method findAllProjectByIntegrationGroup.

@Test
void findAllProjectByIntegrationGroup() {
    Project project = new Project();
    project.setId(1L);
    List<Integration> integrations = integrationRepository.findAllProjectByGroup(project, IntegrationGroupEnum.BTS);
    assertThat(integrations, hasSize(4));
}
Also used : Project(com.epam.ta.reportportal.entity.project.Project) Integration(com.epam.ta.reportportal.entity.integration.Integration) BaseTest(com.epam.ta.reportportal.BaseTest) Test(org.junit.jupiter.api.Test)

Example 17 with Integration

use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.

the class IntegrationRepositoryTest method shouldUpdateEnabledStateByIntegrationTypeId.

@Test
void shouldUpdateEnabledStateByIntegrationTypeId() {
    IntegrationType integrationType = integrationTypeRepository.findById(JIRA_INTEGRATION_TYPE_ID).get();
    integrationRepository.updateEnabledStateByIntegrationTypeId(true, integrationType.getId());
    List<Integration> enabledAfter = integrationRepository.findAllByProjectIdAndType(DEFAULT_PERSONAL_PROJECT_ID, integrationType);
    enabledAfter.forEach(integration -> assertTrue(integration.isEnabled()));
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) IntegrationType(com.epam.ta.reportportal.entity.integration.IntegrationType) BaseTest(com.epam.ta.reportportal.BaseTest) Test(org.junit.jupiter.api.Test)

Example 18 with Integration

use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.

the class IntegrationRepositoryTest method findByNameAndTypeId.

@Test
void findByNameAndTypeId() {
    final Integration jiraIntegration = integrationRepository.findByNameAndTypeIdAndProjectIdIsNull("jira", JIRA_INTEGRATION_TYPE_ID).get();
    assertEquals("jira", jiraIntegration.getName());
    assertEquals(JIRA_INTEGRATION_ID, jiraIntegration.getId());
    assertEquals(JIRA_INTEGRATION_TYPE_ID, jiraIntegration.getType().getId());
}
Also used : Integration(com.epam.ta.reportportal.entity.integration.Integration) BaseTest(com.epam.ta.reportportal.BaseTest) Test(org.junit.jupiter.api.Test)

Aggregations

Integration (com.epam.ta.reportportal.entity.integration.Integration)18 IntegrationType (com.epam.ta.reportportal.entity.integration.IntegrationType)8 BaseTest (com.epam.ta.reportportal.BaseTest)7 Test (org.junit.jupiter.api.Test)7 ReportPortalException (com.epam.ta.reportportal.exception.ReportPortalException)5 AuthIntegrationType (com.epam.reportportal.auth.integration.AuthIntegrationType)4 SamlProvidersReloadEvent (com.epam.reportportal.auth.event.SamlProvidersReloadEvent)2 AuthIntegrationStrategy (com.epam.reportportal.auth.integration.handler.impl.strategy.AuthIntegrationStrategy)2 Project (com.epam.ta.reportportal.entity.project.Project)2 BadCredentialsException (org.springframework.security.authentication.BadCredentialsException)2 AbstractUserReplicator (com.epam.reportportal.auth.integration.AbstractUserReplicator)1 AuthIntegrationBuilder (com.epam.reportportal.auth.integration.builder.AuthIntegrationBuilder)1 SamlParameter (com.epam.reportportal.auth.integration.parameter.SamlParameter)1 CROP_DOMAIN (com.epam.reportportal.auth.util.AuthUtils.CROP_DOMAIN)1 ContentTypeResolver (com.epam.reportportal.commons.ContentTypeResolver)1 UserBinaryDataService (com.epam.ta.reportportal.binary.UserBinaryDataService)1 IntegrationRepository (com.epam.ta.reportportal.dao.IntegrationRepository)1 IntegrationTypeRepository (com.epam.ta.reportportal.dao.IntegrationTypeRepository)1 ProjectRepository (com.epam.ta.reportportal.dao.ProjectRepository)1 UserRepository (com.epam.ta.reportportal.dao.UserRepository)1