use of com.epam.ta.reportportal.entity.integration.IntegrationType in project commons-dao by reportportal.
the class IntegrationRepositoryTest method shouldDeleteAllGlobalByIntegrationTypeId.
@Test
void shouldDeleteAllGlobalByIntegrationTypeId() {
IntegrationType integrationType = integrationTypeRepository.findById(JIRA_INTEGRATION_TYPE_ID).get();
integrationRepository.deleteAllGlobalByIntegrationTypeId(integrationType.getId());
assertThat(integrationRepository.findAllGlobalByType(integrationType), is(empty()));
assertThat(integrationRepository.findAllByProjectIdAndType(DEFAULT_PERSONAL_PROJECT_ID, integrationType), is(not(empty())));
assertThat(integrationRepository.findAllByProjectIdAndType(SUPERADMIN_PERSONAL_PROJECT_ID, integrationType), is(not(empty())));
}
use of com.epam.ta.reportportal.entity.integration.IntegrationType 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()));
}
use of com.epam.ta.reportportal.entity.integration.IntegrationType in project commons-dao by reportportal.
the class IntegrationRepositoryTest method shouldDeleteAllByProjectIdAndIntegrationTypeId.
@Test
void shouldDeleteAllByProjectIdAndIntegrationTypeId() {
IntegrationType integrationType = integrationTypeRepository.findById(JIRA_INTEGRATION_TYPE_ID).get();
integrationRepository.deleteAllByProjectIdAndIntegrationTypeId(SUPERADMIN_PERSONAL_PROJECT_ID, integrationType.getId());
assertThat(integrationRepository.findAllByProjectIdAndType(SUPERADMIN_PERSONAL_PROJECT_ID, integrationType), is(empty()));
assertThat(integrationRepository.findAllByProjectIdAndType(DEFAULT_PERSONAL_PROJECT_ID, integrationType), is(not(empty())));
}
Aggregations