Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit b8a8522

Browse filesBrowse files
committed
Add more assertions.
1 parent 9f55f7c commit b8a8522
Copy full SHA for b8a8522

File tree

Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+13
-0
lines changed

‎src/test/java/org/kohsuke/github/AppTest.java

Copy file name to clipboardExpand all lines: src/test/java/org/kohsuke/github/AppTest.java
+13Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,14 +302,23 @@ public void testQueryIssues() throws IOException {
302302
.pageSize(10)
303303
.list()
304304
.toList();
305+
GHIssue issueWithMilestone = openBugIssues.get(0);
305306
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"));
306311

307312
List<GHIssue> openIssuesWithAssignee = repo.queryIssues()
308313
.assignee(gitHub.getMyself().getLogin())
309314
.state(GHIssueState.OPEN)
310315
.list()
311316
.toList();
317+
GHIssue issueWithAssignee = openIssuesWithAssignee.get(0);
312318
assertThat(openIssuesWithAssignee, is(not(empty())));
319+
assertThat(openIssuesWithAssignee, hasSize(1));
320+
assertThat(issueWithAssignee.getLabels(), hasSize(2));
321+
assertThat(issueWithAssignee.getMilestone(), is(notNullValue()));
313322

314323
List<GHIssue> allIssuesSince = repo.queryIssues()
315324
.mentioned(gitHub.getMyself().getLogin())
@@ -319,7 +328,11 @@ public void testQueryIssues() throws IOException {
319328
.direction(GHDirection.ASC)
320329
.list()
321330
.toList();
331+
GHIssue issueSince = allIssuesSince.get(3);
322332
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));
323336
}
324337

325338
private GHRepository getTestRepository() throws IOException {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.