Search in sources :

Example 1 with IssueGroup

use of com.epam.ta.reportportal.entity.item.issue.IssueGroup in project commons-dao by reportportal.

the class IssueGroupRepositoryTest method findByTestItemIssueGroup.

@Test
void findByTestItemIssueGroup() {
    Arrays.stream(TestItemIssueGroup.values()).filter(it -> !it.equals(TestItemIssueGroup.NOT_ISSUE_FLAG)).forEach(it -> {
        final IssueGroup issueGroup = repository.findByTestItemIssueGroup(it);
        assertEquals(it, issueGroup.getTestItemIssueGroup(), "Incorrect issue group");
        assertNotNull(issueGroup.getId(), "Issue group should have id");
    });
}
Also used : Test(org.junit.jupiter.api.Test) Assertions.assertNotNull(org.junit.jupiter.api.Assertions.assertNotNull) Arrays(java.util.Arrays) BaseTest(com.epam.ta.reportportal.BaseTest) IssueGroup(com.epam.ta.reportportal.entity.item.issue.IssueGroup) TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) Autowired(org.springframework.beans.factory.annotation.Autowired) Assertions.assertEquals(org.junit.jupiter.api.Assertions.assertEquals) IssueGroup(com.epam.ta.reportportal.entity.item.issue.IssueGroup) TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) Test(org.junit.jupiter.api.Test) BaseTest(com.epam.ta.reportportal.BaseTest)

Example 2 with IssueGroup

use of com.epam.ta.reportportal.entity.item.issue.IssueGroup in project commons-dao by reportportal.

the class ProjectUtilsTest method getDefaultIssueTypes.

private static List<IssueType> getDefaultIssueTypes() {
    IssueGroup tiGroup = new IssueGroup();
    tiGroup.setId(1);
    tiGroup.setTestItemIssueGroup(TestItemIssueGroup.TO_INVESTIGATE);
    IssueGroup abGroup = new IssueGroup();
    abGroup.setId(2);
    abGroup.setTestItemIssueGroup(TestItemIssueGroup.AUTOMATION_BUG);
    IssueGroup pbGroup = new IssueGroup();
    pbGroup.setId(3);
    pbGroup.setTestItemIssueGroup(TestItemIssueGroup.PRODUCT_BUG);
    IssueGroup ndGroup = new IssueGroup();
    ndGroup.setId(4);
    ndGroup.setTestItemIssueGroup(TestItemIssueGroup.NO_DEFECT);
    IssueGroup siGroup = new IssueGroup();
    siGroup.setId(5);
    siGroup.setTestItemIssueGroup(TestItemIssueGroup.SYSTEM_ISSUE);
    return Arrays.asList(new IssueType(tiGroup, "ti001", "To Investigate", "TI", "#ffb743"), new IssueType(abGroup, "ab001", "Automation Bug", "AB", "#f7d63e"), new IssueType(pbGroup, "pb001", "Product Bug", "PB", "#ec3900"), new IssueType(ndGroup, "nd001", "No Defect", "ND", "#777777"), new IssueType(siGroup, "si001", "System Issue", "SI", "#0274d1"));
}
Also used : TestItemIssueGroup(com.epam.ta.reportportal.entity.enums.TestItemIssueGroup) IssueGroup(com.epam.ta.reportportal.entity.item.issue.IssueGroup) IssueType(com.epam.ta.reportportal.entity.item.issue.IssueType)

Aggregations

TestItemIssueGroup (com.epam.ta.reportportal.entity.enums.TestItemIssueGroup)2 IssueGroup (com.epam.ta.reportportal.entity.item.issue.IssueGroup)2 BaseTest (com.epam.ta.reportportal.BaseTest)1 IssueType (com.epam.ta.reportportal.entity.item.issue.IssueType)1 Arrays (java.util.Arrays)1 Assertions.assertEquals (org.junit.jupiter.api.Assertions.assertEquals)1 Assertions.assertNotNull (org.junit.jupiter.api.Assertions.assertNotNull)1 Test (org.junit.jupiter.api.Test)1 Autowired (org.springframework.beans.factory.annotation.Autowired)1