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
f4c2a4fe
Commit
f4c2a4fe
authored
May 10, 2017
by
Greg Messner
Browse files
Now tests GitLab API V4.
parent
d2342924
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/test/java/org/gitlab4j/api/TestGitLabApi.java
View file @
f4c2a4fe
...
@@ -81,7 +81,7 @@ public class TestGitLabApi {
...
@@ -81,7 +81,7 @@ public class TestGitLabApi {
}
}
if
(
problems
.
isEmpty
())
{
if
(
problems
.
isEmpty
())
{
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
3
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
4
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
}
else
{
}
else
{
System
.
err
.
print
(
problems
);
System
.
err
.
print
(
problems
);
}
}
...
...
src/test/java/org/gitlab4j/api/TestGitLabSession.java
View file @
f4c2a4fe
...
@@ -77,7 +77,7 @@ public class TestGitLabSession {
...
@@ -77,7 +77,7 @@ public class TestGitLabSession {
@Test
@Test
public
void
testSession
()
throws
GitLabApiException
{
public
void
testSession
()
throws
GitLabApiException
{
GitLabApi
gitLabApi
=
GitLabApi
.
login
(
ApiVersion
.
V
3
,
TEST_HOST_URL
,
TEST_USERNAME
,
TEST_PASSWORD
);
GitLabApi
gitLabApi
=
GitLabApi
.
login
(
ApiVersion
.
V
4
,
TEST_HOST_URL
,
TEST_USERNAME
,
TEST_PASSWORD
);
assertNotNull
(
gitLabApi
);
assertNotNull
(
gitLabApi
);
assertNotNull
(
gitLabApi
.
getSession
());
assertNotNull
(
gitLabApi
.
getSession
());
assertEquals
(
TEST_PRIVATE_TOKEN
,
gitLabApi
.
getSession
().
getPrivateToken
());
assertEquals
(
TEST_PRIVATE_TOKEN
,
gitLabApi
.
getSession
().
getPrivateToken
());
...
...
src/test/java/org/gitlab4j/api/TestNamespaceApi.java
View file @
f4c2a4fe
...
@@ -62,7 +62,7 @@ public class TestNamespaceApi {
...
@@ -62,7 +62,7 @@ public class TestNamespaceApi {
}
}
if
(
problems
.
isEmpty
())
{
if
(
problems
.
isEmpty
())
{
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
3
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
4
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
}
else
{
}
else
{
System
.
err
.
print
(
problems
);
System
.
err
.
print
(
problems
);
}
}
...
...
src/test/java/org/gitlab4j/api/TestProjectApi.java
View file @
f4c2a4fe
...
@@ -69,7 +69,7 @@ public class TestProjectApi {
...
@@ -69,7 +69,7 @@ public class TestProjectApi {
}
}
if
(
problems
.
isEmpty
())
{
if
(
problems
.
isEmpty
())
{
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
3
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
gitLabApi
=
new
GitLabApi
(
ApiVersion
.
V
4
,
TEST_HOST_URL
,
TEST_PRIVATE_TOKEN
);
}
else
{
}
else
{
System
.
err
.
print
(
problems
);
System
.
err
.
print
(
problems
);
}
}
...
...
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