@@ -302,14 +302,23 @@ public void testQueryIssues() throws IOException {
302
302
.pageSize (10 )
303
303
.list ()
304
304
.toList ();
305
+ GHIssue issueWithMilestone = openBugIssues .get (0 );
305
306
assertThat (openBugIssues , is (not (empty ())));
307
+ assertThat (openBugIssues , hasSize (1 ));
308
+ assertThat (issueWithMilestone .getTitle (), is ("Issue with milestone" ));
309
+ assertThat (issueWithMilestone .getAssignee ().getLogin (), is ("bloslo" ));
310
+ assertThat (issueWithMilestone .getBody (), containsString ("@bloslo" ));
306
311
307
312
List <GHIssue > openIssuesWithAssignee = repo .queryIssues ()
308
313
.assignee (gitHub .getMyself ().getLogin ())
309
314
.state (GHIssueState .OPEN )
310
315
.list ()
311
316
.toList ();
317
+ GHIssue issueWithAssignee = openIssuesWithAssignee .get (0 );
312
318
assertThat (openIssuesWithAssignee , is (not (empty ())));
319
+ assertThat (openIssuesWithAssignee , hasSize (1 ));
320
+ assertThat (issueWithAssignee .getLabels (), hasSize (2 ));
321
+ assertThat (issueWithAssignee .getMilestone (), is (notNullValue ()));
313
322
314
323
List <GHIssue > allIssuesSince = repo .queryIssues ()
315
324
.mentioned (gitHub .getMyself ().getLogin ())
@@ -319,7 +328,11 @@ public void testQueryIssues() throws IOException {
319
328
.direction (GHDirection .ASC )
320
329
.list ()
321
330
.toList ();
331
+ GHIssue issueSince = allIssuesSince .get (3 );
322
332
assertThat (allIssuesSince , is (not (empty ())));
333
+ assertThat (allIssuesSince , hasSize (4 ));
334
+ assertThat (issueSince .getBody (), is ("Test closed issue @bloslo" ));
335
+ assertThat (issueSince .getState (), is (GHIssueState .CLOSED ));
323
336
}
324
337
325
338
private GHRepository getTestRepository () throws IOException {
0 commit comments