Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
fc54bb3a
Commit
fc54bb3a
authored
6 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Fixed issue with issue filter test.
parent
71e3cce3
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/test/java/org/gitlab4j/api/TestIssuesApi.java
+10
-11
src/test/java/org/gitlab4j/api/TestIssuesApi.java
with
10 additions
and
11 deletions
+10
-11
src/test/java/org/gitlab4j/api/TestIssuesApi.java
+
10
-
11
View file @
fc54bb3a
...
...
@@ -329,6 +329,7 @@ public class TestIssuesApi {
@Test
public
void
testGetIssuesWithOptions
()
throws
GitLabApiException
{
assertNotNull
(
testProject
);
Integer
projectId
=
testProject
.
getId
();
...
...
@@ -336,18 +337,16 @@ public class TestIssuesApi {
Issue
issueClose
=
gitLabApi
.
getIssuesApi
().
createIssue
(
projectId
,
getUniqueTitle
(),
ISSUE_DESCRIPTION
);
issueClose
=
gitLabApi
.
getIssuesApi
().
closeIssue
(
projectId
,
issueClose
.
getIid
());
IssueFilter
openFilter
=
new
IssueFilter
()
.
withState
(
IssueState
.
OPENED
);
IssueFilter
closeFilter
=
new
IssueFilter
()
.
withState
(
IssueState
.
CLOSED
);
List
<
Issue
>
opens
=
gitLabApi
.
getIssuesApi
().
getIssues
(
projectId
,
openFilter
);
List
<
Issue
>
closes
=
gitLabApi
.
getIssuesApi
().
getIssues
(
projectId
,
closeFilter
);
final
Integer
openIid
=
issueOpen
.
getIid
();
IssueFilter
openFilter
=
new
IssueFilter
().
withState
(
IssueState
.
OPENED
);
List
<
Issue
>
opens
=
gitLabApi
.
getIssuesApi
().
getIssues
(
projectId
,
openFilter
);
assertNotNull
(
opens
);
assertTrue
(
opens
.
stream
().
map
(
Issue:
:
getIid
).
anyMatch
(
iid
->
iid
.
equals
(
openIid
)));
final
Integer
closedIid
=
issueClose
.
getIid
();
IssueFilter
closeFilter
=
new
IssueFilter
().
withState
(
IssueState
.
CLOSED
);
List
<
Issue
>
closes
=
gitLabApi
.
getIssuesApi
().
getIssues
(
projectId
,
closeFilter
);
assertNotNull
(
closes
);
assertEquals
(
opens
.
get
(
0
).
getIid
(),
issueOpen
.
getIid
());
assertEquals
(
closes
.
get
(
0
).
getIid
(),
issueClose
.
getIid
());
assertTrue
(
closes
.
stream
().
map
(
Issue:
:
getIid
).
anyMatch
(
iid
->
iid
.
equals
(
closedIid
)));
}
}
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets