use of com.enonic.xp.issue.IssueQuery in project xp by enonic.
the class IssueServiceImplTest_findIssues method findByContentId4.
@Test
public void findByContentId4() throws Exception {
ContentId contentId = ContentId.from("issue-item-4");
IssueQuery query = IssueQuery.create().items(ContentIds.from(contentId)).build();
final FindIssuesResult result = this.issueService.findIssues(query);
assertNotNull(result);
assertEquals(1, result.getHits());
assertTrue(result.getIssues().stream().allMatch(issue -> issue.getPublishRequest().getItems().stream().anyMatch(item -> item.getId().equals(contentId))));
}
use of com.enonic.xp.issue.IssueQuery in project xp by enonic.
the class IssueServiceImplTest_findIssues method find.
@Test
public void find() throws Exception {
IssueQuery query = IssueQuery.create().build();
final FindIssuesResult result = this.issueService.findIssues(query);
assertNotNull(result);
assertEquals(3, result.getHits());
}
Aggregations