use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.
the class IntegrationRepositoryTest method shouldFindAllGlobalByIntegrationType.
@Test
void shouldFindAllGlobalByIntegrationType() {
IntegrationType integrationType = integrationTypeRepository.findById(2L).get();
List<Integration> globalEmailIntegrations = integrationRepository.findAllGlobalByType(integrationType);
assertNotNull(globalEmailIntegrations);
assertEquals(GLOBAL_EMAIL_INTEGRATIONS_COUNT, globalEmailIntegrations.size());
globalEmailIntegrations.forEach(i -> assertNull(i.getProject()));
}
use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.
the class IntegrationRepositoryTest method shouldUpdateEnabledStateByIntegrationId.
@Test
void shouldUpdateEnabledStateByIntegrationId() {
integrationRepository.updateEnabledStateById(true, RALLY_INTEGRATION_ID);
Integration after = integrationRepository.findById(RALLY_INTEGRATION_ID).get();
assertTrue(after.isEnabled());
}
use of com.epam.ta.reportportal.entity.integration.Integration in project commons-dao by reportportal.
the class IntegrationRepositoryTest method findByIdAndTypeId.
@Test
void findByIdAndTypeId() {
final Integration jiraIntegration = integrationRepository.findByIdAndTypeIdAndProjectIdIsNull(JIRA_INTEGRATION_ID, JIRA_INTEGRATION_TYPE_ID).get();
assertEquals("jira", jiraIntegration.getName());
assertEquals(JIRA_INTEGRATION_ID, jiraIntegration.getId());
assertEquals(JIRA_INTEGRATION_TYPE_ID, jiraIntegration.getType().getId());
}
use of com.epam.ta.reportportal.entity.integration.Integration in project service-authorization by reportportal.
the class CreateAuthIntegrationHandlerImpl method createAuthIntegration.
@Override
public AbstractAuthResource createAuthIntegration(AuthIntegrationType type, UpdateAuthRQ request, ReportPortalUser user) {
final IntegrationType integrationType = getIntegrationType(type);
final AuthIntegrationStrategy authIntegrationStrategy = getAuthStragegy(type);
final Integration integration = authIntegrationStrategy.createIntegration(integrationType, request, user.getUsername());
return type.getToResourceMapper().apply(integration);
}
use of com.epam.ta.reportportal.entity.integration.Integration in project service-authorization by reportportal.
the class CreateAuthIntegrationHandlerImpl method updateAuthIntegration.
@Override
public AbstractAuthResource updateAuthIntegration(AuthIntegrationType type, Long integrationId, UpdateAuthRQ request, ReportPortalUser user) {
final IntegrationType integrationType = getIntegrationType(type);
final AuthIntegrationStrategy authIntegrationStrategy = getAuthStragegy(type);
final Integration integration = authIntegrationStrategy.updateIntegration(integrationType, integrationId, request);
return type.getToResourceMapper().apply(integration);
}
Aggregations