Skip to content

Commit 160b12e

Browse files
committed
General code clean-up (#338).
1 parent 79f8d9e commit 160b12e

File tree

2 files changed

+16
-7
lines changed

2 files changed

+16
-7
lines changed

src/main/java/org/gitlab4j/api/ApplicationsApi.java

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ public ApplicationsApi(GitLabApi gitLabApi) {
2323
/**
2424
* Get all OATH applications.
2525
*
26+
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
27+
*
2628
* @return a List of OAUTH Application instances
2729
* @throws GitLabApiException if any exception occurs
2830
*/
@@ -33,6 +35,8 @@ public List<Application> getApplications() throws GitLabApiException {
3335
/**
3436
* Get all OAUTH applications using the specified page and per page setting
3537
*
38+
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
39+
*
3640
* @param page the page to get
3741
* @param perPage the number of items per page
3842
* @return a list of OAUTH Applications in the specified range
@@ -46,6 +50,8 @@ public List<Application> getApplications(int page, int perPage) throws GitLabApi
4650
/**
4751
* Get a Pager of all OAUTH applications.
4852
*
53+
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
54+
*
4955
* @param itemsPerPage the number of items per page
5056
* @return a Pager of Application instances in the specified range
5157
* @throws GitLabApiException if any exception occurs
@@ -57,6 +63,8 @@ public Pager<Application> getApplications(int itemsPerPage) throws GitLabApiExce
5763
/**
5864
* Get a Stream of all OAUTH Application instances.
5965
*
66+
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
67+
*
6068
* @return a Stream of OAUTH Application instances
6169
* @throws GitLabApiException if any exception occurs
6270
*/
@@ -67,6 +75,8 @@ public Stream<Application> getApplicationsStream() throws GitLabApiException {
6775
/**
6876
* Create an OAUTH Application.
6977
*
78+
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
79+
*
7080
* @param name the name for the OAUTH Application
7181
* @param redirectUri the redirect URI for the OAUTH Application
7282
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
@@ -85,6 +95,8 @@ public Application createApplication(String name, String redirectUri, Applicatio
8595
/**
8696
* Create an OAUTH Application.
8797
*
98+
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
99+
*
88100
* @param name the name for the OAUTH Application
89101
* @param redirectUri the redirect URI for the OAUTH Application
90102
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
@@ -109,6 +121,8 @@ public Application createApplication(String name, String redirectUri, List<Appli
109121
/**
110122
* Delete the specified OAUTH Application.
111123
*
124+
* <pre><code>GitLab Endpoint: DELETE /api/v4/applications/:applicationId</code></pre>
125+
*
112126
* @param applicationId the ID of the OUAUTH Application to delete
113127
* @throws GitLabApiException if any exception occurs
114128
*/

src/test/java/org/gitlab4j/api/TestApplicationsApi.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232

3333
import org.gitlab4j.api.Constants.ApplicationScope;
3434
import org.gitlab4j.api.models.Application;
35-
import org.junit.AfterClass;
3635
import org.junit.Before;
3736
import org.junit.BeforeClass;
3837
import org.junit.Test;
@@ -47,7 +46,7 @@
4746
* If any of the above are NULL, all tests in this class will be skipped.
4847
*/
4948
@Category(IntegrationTest.class)
50-
public class TestApplications extends AbstractIntegrationTest {
49+
public class TestApplicationsApi extends AbstractIntegrationTest {
5150

5251
private static final String TEST_APPLICATION_NAME = "Test Application for GitLab4J-API";
5352
private static final String TEST_APPLICATION_REDIRECT = "http://example.com/application";
@@ -56,7 +55,7 @@ public class TestApplications extends AbstractIntegrationTest {
5655

5756
private static GitLabApi gitLabApi;
5857

59-
public TestApplications() {
58+
public TestApplicationsApi() {
6059
super();
6160
}
6261

@@ -77,10 +76,6 @@ public static void setup() {
7776
}
7877
}
7978

80-
@AfterClass
81-
public static void teardown() throws GitLabApiException {
82-
}
83-
8479
@Before
8580
public void beforeMethod() {
8681
assumeNotNull(gitLabApi);

0 commit comments

Comments
 (0)