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
40a846ff
Commit
40a846ff
authored
Feb 22, 2018
by
Greg Messner
Browse files
Added tests for NotificationSettings (#143).
parent
a252e37e
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/GitLabApi.java
View file @
40a846ff
...
@@ -49,6 +49,7 @@ public class GitLabApi {
...
@@ -49,6 +49,7 @@ public class GitLabApi {
private
MergeRequestApi
mergeRequestApi
;
private
MergeRequestApi
mergeRequestApi
;
private
MilestonesApi
milestonesApi
;
private
MilestonesApi
milestonesApi
;
private
NamespaceApi
namespaceApi
;
private
NamespaceApi
namespaceApi
;
private
NotificationSettingsApi
notificationSettingsApi
;
private
PipelineApi
pipelineApi
;
private
PipelineApi
pipelineApi
;
private
ProjectApi
projectApi
;
private
ProjectApi
projectApi
;
private
RepositoryApi
repositoryApi
;
private
RepositoryApi
repositoryApi
;
...
@@ -848,6 +849,25 @@ public class GitLabApi {
...
@@ -848,6 +849,25 @@ public class GitLabApi {
return
(
notesApi
);
return
(
notesApi
);
}
}
/**
* Gets the NotesApi instance owned by this GitLabApi instance. The NotesApi is used
* to perform all notes related API calls.
*
* @return the NotesApi instance owned by this GitLabApi instance
*/
public
NotificationSettingsApi
getNotificationSettingsApi
()
{
if
(
notificationSettingsApi
==
null
)
{
synchronized
(
this
)
{
if
(
notificationSettingsApi
==
null
)
{
notificationSettingsApi
=
new
NotificationSettingsApi
(
this
);
}
}
}
return
(
notificationSettingsApi
);
}
/**
/**
* Gets the PipelineApi instance owned by this GitLabApi instance. The PipelineApi is used
* Gets the PipelineApi instance owned by this GitLabApi instance. The PipelineApi is used
* to perform all pipeline related API calls.
* to perform all pipeline related API calls.
...
...
src/test/java/org/gitlab4j/api/TestGitLabApiBeans.java
View file @
40a846ff
...
@@ -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.NotificationSettings
;
import
org.gitlab4j.api.models.OauthTokenResponse
;
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
;
...
@@ -331,6 +332,17 @@ public class TestGitLabApiBeans {
...
@@ -331,6 +332,17 @@ public class TestGitLabApiBeans {
}
}
}
}
@Test
public
void
testNotificationSettings
()
{
try
{
NotificationSettings
settings
=
makeFakeApiCall
(
NotificationSettings
.
class
,
"notification-settings"
);
assertTrue
(
compareJson
(
settings
,
"notification-settings"
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
}
@Test
@Test
public
void
testProject
()
{
public
void
testProject
()
{
...
...
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