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
e9583495
Commit
e9583495
authored
5 years ago
by
Greg Messner
Browse files
Options
Download
Email Patches
Plain Diff
Added test for search results (#425).
parent
5999be97
main
5.0.x
5.0.x.jdk17
6.x
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
+7
-0
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
src/test/resources/org/gitlab4j/api/wiki-blobs.json
+11
-0
src/test/resources/org/gitlab4j/api/wiki-blobs.json
with
18 additions
and
0 deletions
+18
-0
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
+
7
-
0
View file @
e9583495
...
@@ -83,6 +83,7 @@ import org.gitlab4j.api.models.PushRules;
...
@@ -83,6 +83,7 @@ import org.gitlab4j.api.models.PushRules;
import
org.gitlab4j.api.models.RegistryRepository
;
import
org.gitlab4j.api.models.RegistryRepository
;
import
org.gitlab4j.api.models.Runner
;
import
org.gitlab4j.api.models.Runner
;
import
org.gitlab4j.api.models.RunnerDetail
;
import
org.gitlab4j.api.models.RunnerDetail
;
import
org.gitlab4j.api.models.SearchBlob
;
import
org.gitlab4j.api.models.Session
;
import
org.gitlab4j.api.models.Session
;
import
org.gitlab4j.api.models.Snippet
;
import
org.gitlab4j.api.models.Snippet
;
import
org.gitlab4j.api.models.SshKey
;
import
org.gitlab4j.api.models.SshKey
;
...
@@ -545,4 +546,10 @@ public class TestGitLabApiBeans {
...
@@ -545,4 +546,10 @@ public class TestGitLabApiBeans {
List
<
Label
>
labels
=
unmarshalResourceList
(
Label
.
class
,
"labels.json"
);
List
<
Label
>
labels
=
unmarshalResourceList
(
Label
.
class
,
"labels.json"
);
assertTrue
(
compareJson
(
labels
,
"labels.json"
));
assertTrue
(
compareJson
(
labels
,
"labels.json"
));
}
}
@Test
public
void
testSearchBlobs
()
throws
Exception
{
List
<
SearchBlob
>
searchResults
=
unmarshalResourceList
(
SearchBlob
.
class
,
"wiki-blobs.json"
);
assertTrue
(
compareJson
(
searchResults
,
"wiki-blobs.json"
));
}
}
}
This diff is collapsed.
Click to expand it.
src/test/resources/org/gitlab4j/api/wiki-blobs.json
0 → 100644
+
11
-
0
View file @
e9583495
[
{
"basename"
:
"home"
,
"data"
:
"hello
\n\n
and bye
\n\n
end"
,
"filename"
:
"home.md"
,
"id"
:
123
,
"ref"
:
"master"
,
"startline"
:
5
,
"project_id"
:
6
}
]
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