Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
38a0df39
Commit
38a0df39
authored
Dec 28, 2017
by
Greg Messner
Browse files
Added test of OauthTokenResponse bean.
parent
7881a1bb
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
View file @
38a0df39
...
@@ -48,6 +48,7 @@ import org.gitlab4j.api.models.Member;
...
@@ -48,6 +48,7 @@ import org.gitlab4j.api.models.Member;
import
org.gitlab4j.api.models.MergeRequest
;
import
org.gitlab4j.api.models.MergeRequest
;
import
org.gitlab4j.api.models.Milestone
;
import
org.gitlab4j.api.models.Milestone
;
import
org.gitlab4j.api.models.Note
;
import
org.gitlab4j.api.models.Note
;
import
org.gitlab4j.api.models.OauthTokenResponse
;
import
org.gitlab4j.api.models.Pipeline
;
import
org.gitlab4j.api.models.Pipeline
;
import
org.gitlab4j.api.models.Project
;
import
org.gitlab4j.api.models.Project
;
import
org.gitlab4j.api.models.ProjectHook
;
import
org.gitlab4j.api.models.ProjectHook
;
...
@@ -418,6 +419,17 @@ public class TestGitLabApiBeans {
...
@@ -418,6 +419,17 @@ public class TestGitLabApiBeans {
}
}
}
}
@Test
public
void
testOauthToken
()
{
try
{
OauthTokenResponse
token
=
makeFakeApiCall
(
OauthTokenResponse
.
class
,
"oauth-token"
);
assertTrue
(
compareJson
(
token
,
"oauth-token"
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@Test
@Test
public
void
testLabels
()
{
public
void
testLabels
()
{
...
...
src/test/resources/org/gitlab4j/api/oauth-token.json
0 → 100644
View file @
38a0df39
{
"access_token"
:
"7e6f7f02d5ce8e5c3d2123a210674ccea6b70547c77132b0dca502f8a4df760f"
,
"token_type"
:
"bearer"
,
"refresh_token"
:
"c29a678544ceb726a2a605e44502fa5cad8752cfab42aeae21413cacb703178f"
,
"scope"
:
"api"
,
"created_at"
:
1514489666
}
\ No newline at end of file
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