Commit 160b12e7 authored by Greg Messner's avatar Greg Messner
Browse files

General code clean-up (#338).

parent 79f8d9e2
...@@ -23,6 +23,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -23,6 +23,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Get all OATH applications. * Get all OATH applications.
* *
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @return a List of OAUTH Application instances * @return a List of OAUTH Application instances
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -33,6 +35,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -33,6 +35,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Get all OAUTH applications using the specified page and per page setting * Get all OAUTH applications using the specified page and per page setting
* *
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @param page the page to get * @param page the page to get
* @param perPage the number of items per page * @param perPage the number of items per page
* @return a list of OAUTH Applications in the specified range * @return a list of OAUTH Applications in the specified range
...@@ -46,6 +50,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -46,6 +50,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Get a Pager of all OAUTH applications. * Get a Pager of all OAUTH applications.
* *
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @param itemsPerPage the number of items per page * @param itemsPerPage the number of items per page
* @return a Pager of Application instances in the specified range * @return a Pager of Application instances in the specified range
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
...@@ -57,6 +63,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -57,6 +63,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Get a Stream of all OAUTH Application instances. * Get a Stream of all OAUTH Application instances.
* *
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @return a Stream of OAUTH Application instances * @return a Stream of OAUTH Application instances
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
...@@ -67,6 +75,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -67,6 +75,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Create an OAUTH Application. * Create an OAUTH Application.
* *
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
*
* @param name the name for the OAUTH Application * @param name the name for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application * @param redirectUri the redirect URI for the OAUTH Application
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email) * @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
...@@ -85,6 +95,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -85,6 +95,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Create an OAUTH Application. * Create an OAUTH Application.
* *
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
*
* @param name the name for the OAUTH Application * @param name the name for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application * @param redirectUri the redirect URI for the OAUTH Application
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email) * @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
...@@ -109,6 +121,8 @@ public class ApplicationsApi extends AbstractApi { ...@@ -109,6 +121,8 @@ public class ApplicationsApi extends AbstractApi {
/** /**
* Delete the specified OAUTH Application. * Delete the specified OAUTH Application.
* *
* <pre><code>GitLab Endpoint: DELETE /api/v4/applications/:applicationId</code></pre>
*
* @param applicationId the ID of the OUAUTH Application to delete * @param applicationId the ID of the OUAUTH Application to delete
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
......
...@@ -32,7 +32,6 @@ import java.util.List; ...@@ -32,7 +32,6 @@ import java.util.List;
import org.gitlab4j.api.Constants.ApplicationScope; import org.gitlab4j.api.Constants.ApplicationScope;
import org.gitlab4j.api.models.Application; import org.gitlab4j.api.models.Application;
import org.junit.AfterClass;
import org.junit.Before; import org.junit.Before;
import org.junit.BeforeClass; import org.junit.BeforeClass;
import org.junit.Test; import org.junit.Test;
...@@ -47,7 +46,7 @@ import org.junit.experimental.categories.Category; ...@@ -47,7 +46,7 @@ import org.junit.experimental.categories.Category;
* If any of the above are NULL, all tests in this class will be skipped. * If any of the above are NULL, all tests in this class will be skipped.
*/ */
@Category(IntegrationTest.class) @Category(IntegrationTest.class)
public class TestApplications extends AbstractIntegrationTest { public class TestApplicationsApi extends AbstractIntegrationTest {
private static final String TEST_APPLICATION_NAME = "Test Application for GitLab4J-API"; private static final String TEST_APPLICATION_NAME = "Test Application for GitLab4J-API";
private static final String TEST_APPLICATION_REDIRECT = "http://example.com/application"; private static final String TEST_APPLICATION_REDIRECT = "http://example.com/application";
...@@ -56,7 +55,7 @@ public class TestApplications extends AbstractIntegrationTest { ...@@ -56,7 +55,7 @@ public class TestApplications extends AbstractIntegrationTest {
private static GitLabApi gitLabApi; private static GitLabApi gitLabApi;
public TestApplications() { public TestApplicationsApi() {
super(); super();
} }
...@@ -77,10 +76,6 @@ public class TestApplications extends AbstractIntegrationTest { ...@@ -77,10 +76,6 @@ public class TestApplications extends AbstractIntegrationTest {
} }
} }
@AfterClass
public static void teardown() throws GitLabApiException {
}
@Before @Before
public void beforeMethod() { public void beforeMethod() {
assumeNotNull(gitLabApi); assumeNotNull(gitLabApi);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment