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));
}
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()));
}
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());
}
Aggregations