From a09587b6d141edbc68e7de13497cee2d038b7f97 Mon Sep 17 00:00:00 2001 From: Liam Newman Date: Mon, 26 Sep 2022 23:23:54 -0700 Subject: [PATCH] Fix test javadocs --- .../org/kohsuke/github/AbuseLimitHandler.java | 1 + src/test/java/org/kohsuke/HookApp.java | 14 +- .../github/AbstractGHAppInstallationTest.java | 10 +- .../github/AbstractGitHubWireMockTest.java | 59 ++- .../kohsuke/github/AbuseLimitHandlerTest.java | 12 +- src/test/java/org/kohsuke/github/AppTest.java | 197 +++++--- .../java/org/kohsuke/github/ArchTests.java | 24 +- .../org/kohsuke/github/BridgeMethodTest.java | 24 +- .../java/org/kohsuke/github/CommitTest.java | 35 +- .../kohsuke/github/GHAppInstallationTest.java | 6 +- .../java/org/kohsuke/github/GHAppTest.java | 32 +- .../GHAuthenticatedAppInstallationTest.java | 3 +- .../github/GHBranchProtectionTest.java | 21 +- .../java/org/kohsuke/github/GHBranchTest.java | 3 +- .../kohsuke/github/GHCheckRunBuilderTest.java | 21 +- .../github/GHContentIntegrationTest.java | 149 ++++-- .../org/kohsuke/github/GHDeploymentTest.java | 9 +- .../org/kohsuke/github/GHDiscussionTest.java | 18 +- .../kohsuke/github/GHEventPayloadTest.java | 147 ++++-- .../java/org/kohsuke/github/GHGistTest.java | 11 +- .../org/kohsuke/github/GHGistUpdaterTest.java | 9 +- .../java/org/kohsuke/github/GHHookTest.java | 3 +- .../github/GHIssueEventAttributeTest.java | 3 +- .../org/kohsuke/github/GHIssueEventTest.java | 15 +- .../java/org/kohsuke/github/GHIssueTest.java | 34 +- .../org/kohsuke/github/GHLicenseTest.java | 28 +- .../kohsuke/github/GHMarketplacePlanTest.java | 12 +- .../org/kohsuke/github/GHMilestoneTest.java | 15 +- .../java/org/kohsuke/github/GHObjectTest.java | 3 +- .../kohsuke/github/GHOrganizationTest.java | 55 ++- .../java/org/kohsuke/github/GHPersonTest.java | 11 +- .../org/kohsuke/github/GHProjectCardTest.java | 21 +- .../kohsuke/github/GHProjectColumnTest.java | 12 +- .../org/kohsuke/github/GHProjectTest.java | 21 +- .../kohsuke/github/GHPullRequestMockTest.java | 3 +- .../org/kohsuke/github/GHPullRequestTest.java | 85 ++-- .../org/kohsuke/github/GHRateLimitTest.java | 17 +- .../org/kohsuke/github/GHReleaseTest.java | 18 +- .../github/GHRepositoryStatisticsTest.java | 35 +- .../org/kohsuke/github/GHRepositoryTest.java | 217 ++++---- .../java/org/kohsuke/github/GHTagTest.java | 9 +- .../org/kohsuke/github/GHTeamBuilderTest.java | 3 +- .../java/org/kohsuke/github/GHTeamTest.java | 28 +- .../org/kohsuke/github/GHTreeBuilderTest.java | 15 +- .../java/org/kohsuke/github/GHUserTest.java | 28 +- .../github/GHVerificationReasonTest.java | 41 +- .../org/kohsuke/github/GHWorkflowRunTest.java | 27 +- .../org/kohsuke/github/GHWorkflowTest.java | 21 +- .../kohsuke/github/GitHubConnectionTest.java | 36 +- .../org/kohsuke/github/GitHubStaticTest.java | 39 +- .../java/org/kohsuke/github/GitHubTest.java | 37 +- .../org/kohsuke/github/Github2faTest.java | 3 +- .../org/kohsuke/github/LifecycleTest.java | 5 +- ...InstallationAuthorizationProviderTest.java | 6 +- src/test/java/org/kohsuke/github/Payload.java | 2 +- .../java/org/kohsuke/github/PayloadRule.java | 51 +- .../kohsuke/github/RateLimitCheckerTest.java | 5 +- .../kohsuke/github/RateLimitHandlerTest.java | 12 +- .../kohsuke/github/RepositoryTrafficTest.java | 9 +- .../kohsuke/github/RequesterRetryTest.java | 174 ++++--- .../github/WireMockStatusReporterTest.java | 18 +- .../github/extras/GitHubCachingTest.java | 22 + .../github/extras/OkHttpConnectorTest.java | 45 ++ .../authorization/JWTTokenProviderTest.java | 46 +- .../extras/okhttp3/GitHubCachingTest.java | 22 + .../extras/okhttp3/OkHttpConnectorTest.java | 51 ++ .../okhttp3/OkHttpGitHubConnectorTest.java | 51 ++ .../internal/DefaultGitHubConnectorTest.java | 13 + .../github/internal/EnumUtilsTest.java | 7 + .../github/junit/GitHubWireMockRule.java | 92 ++++ .../github/junit/WireMockMultiServerRule.java | 61 +++ .../kohsuke/github/junit/WireMockRule.java | 462 ++++++++++++++++++ .../junit/WireMockRuleConfiguration.java | 210 ++++++++ 73 files changed, 2362 insertions(+), 702 deletions(-) diff --git a/src/main/java/org/kohsuke/github/AbuseLimitHandler.java b/src/main/java/org/kohsuke/github/AbuseLimitHandler.java index 415e093a14..d6894adf9a 100644 --- a/src/main/java/org/kohsuke/github/AbuseLimitHandler.java +++ b/src/main/java/org/kohsuke/github/AbuseLimitHandler.java @@ -8,6 +8,7 @@ import javax.annotation.Nonnull; +// TODO: Auto-generated Javadoc /** * Pluggable strategy to determine what to do when the API abuse limit is hit. * diff --git a/src/test/java/org/kohsuke/HookApp.java b/src/test/java/org/kohsuke/HookApp.java index b083d5df7a..1b67eb67aa 100644 --- a/src/test/java/org/kohsuke/HookApp.java +++ b/src/test/java/org/kohsuke/HookApp.java @@ -16,12 +16,14 @@ * @author Kohsuke Kawaguchi */ public class HookApp { - + /** * The main method. * - * @param args the arguments - * @throws Exception the exception + * @param args + * the arguments + * @throws Exception + * the exception */ public static void main(String[] args) throws Exception { // GitHub.connect().getMyself().getRepository("sandbox").createWebHook( @@ -34,8 +36,10 @@ public static void main(String[] args) throws Exception { /** * Do index. * - * @param req the req - * @throws IOException Signals that an I/O exception has occurred. + * @param req + * the req + * @throws IOException + * Signals that an I/O exception has occurred. */ public void doIndex(StaplerRequest req) throws IOException { String str = req.getParameter("payload"); diff --git a/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java b/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java index 86523bf12f..40b9b0bdbf 100644 --- a/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java +++ b/src/test/java/org/kohsuke/github/AbstractGHAppInstallationTest.java @@ -33,10 +33,10 @@ public class AbstractGHAppInstallationTest extends AbstractGitHubWireMockTest { /** The jwt provider 1. */ protected final AuthorizationProvider jwtProvider1; - + /** The jwt provider 2. */ protected final AuthorizationProvider jwtProvider2; - + /** The jwt provider 3. */ protected final AuthorizationProvider jwtProvider3; @@ -82,9 +82,11 @@ private String createJwtToken(String keyFileResouceName, String appId) { /** * Gets the app installation with token. * - * @param jwtToken the jwt token + * @param jwtToken + * the jwt token * @return the app installation with token - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHAppInstallation getAppInstallationWithToken(String jwtToken) throws IOException { GitHub gitHub = getGitHubBuilder().withJwtToken(jwtToken) diff --git a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java index 3549e7161d..990583c945 100644 --- a/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java +++ b/src/test/java/org/kohsuke/github/AbstractGitHubWireMockTest.java @@ -39,7 +39,7 @@ public abstract class AbstractGitHubWireMockTest { /** The Constant STUBBED_USER_LOGIN. */ final static String STUBBED_USER_LOGIN = "placeholder-user"; - + /** The Constant STUBBED_USER_PASSWORD. */ final static String STUBBED_USER_PASSWORD = "placeholder-password"; @@ -58,7 +58,7 @@ public abstract class AbstractGitHubWireMockTest { /** The base files class path. */ protected final String baseFilesClassPath = this.getClass().getName().replace('.', '/'); - + /** The base record path. */ protected final String baseRecordPath = "src/test/resources/" + baseFilesClassPath + "/wiremock"; @@ -136,7 +136,8 @@ protected GitHubBuilder getGitHubBuilder() { /** * Wire mock setup. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void wireMockSetup() throws Exception { @@ -164,7 +165,8 @@ protected void snapshotNotAllowed() { /** * Require proxy. * - * @param reason the reason + * @param reason + * the reason */ protected void requireProxy(String reason) { assumeTrue("Test only valid when proxying (-Dtest.github.useProxy to enable): " + reason, @@ -174,7 +176,8 @@ protected void requireProxy(String reason) { /** * Verify authenticated. * - * @param instance the instance + * @param instance + * the instance */ protected void verifyAuthenticated(GitHub instance) { assertThat( @@ -195,7 +198,8 @@ protected GHUser getUser() { /** * Gets the user. * - * @param gitHub the git hub + * @param gitHub + * the git hub * @return the user */ protected static GHUser getUser(GitHub gitHub) { @@ -255,7 +259,8 @@ protected GHRepository getTempRepository(String name) throws IOException { /** * Cleanup temp repositories. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Before @After @@ -270,8 +275,10 @@ public void cleanupTempRepositories() throws IOException { /** * Cleanup repository. * - * @param fullName the full name - * @throws IOException Signals that an I/O exception has occurred. + * @param fullName + * the full name + * @throws IOException + * Signals that an I/O exception has occurred. */ protected void cleanupRepository(String fullName) throws IOException { if (mockGitHub.isUseProxy()) { @@ -331,11 +338,12 @@ private String getOrganization() throws IOException { public static void fail() { Assert.fail(); } - + /** * Fail. * - * @param reason the reason + * @param reason + * the reason */ public static void fail(String reason) { Assert.fail(reason); @@ -344,9 +352,12 @@ public static void fail(String reason) { /** * Assert that. * - * @param the generic type - * @param actual the actual - * @param matcher the matcher + * @param + * the generic type + * @param actual + * the actual + * @param matcher + * the matcher */ public static void assertThat(T actual, Matcher matcher) { MatcherAssert.assertThat("", actual, matcher); @@ -355,10 +366,14 @@ public static void assertThat(T actual, Matcher matcher) { /** * Assert that. * - * @param the generic type - * @param reason the reason - * @param actual the actual - * @param matcher the matcher + * @param + * the generic type + * @param reason + * the reason + * @param actual + * the actual + * @param matcher + * the matcher */ public static void assertThat(String reason, T actual, Matcher matcher) { MatcherAssert.assertThat(reason, actual, matcher); @@ -367,8 +382,10 @@ public static void assertThat(String reason, T actual, Matcher ma /** * Assert that. * - * @param reason the reason - * @param assertion the assertion + * @param reason + * the reason + * @param assertion + * the assertion */ public static void assertThat(String reason, boolean assertion) { MatcherAssert.assertThat(reason, assertion); @@ -378,7 +395,7 @@ public static void assertThat(String reason, boolean assertion) { * The Class TemplatingHelper. */ protected static class TemplatingHelper { - + /** The test start date. */ public Date testStartDate = new Date(); diff --git a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java index a768b13fcb..646eca6d00 100644 --- a/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java +++ b/src/test/java/org/kohsuke/github/AbuseLimitHandlerTest.java @@ -61,7 +61,8 @@ protected WireMockConfiguration getWireMockOptions() { /** * Test handler fail. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_Fail() throws Exception { @@ -222,7 +223,8 @@ public void onError(IOException e, HttpURLConnection uc) throws IOException { /** * Test handler http status fail. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_HttpStatus_Fail() throws Exception { @@ -254,7 +256,8 @@ public void testHandler_HttpStatus_Fail() throws Exception { /** * Test handler wait. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_Wait() throws Exception { @@ -275,7 +278,8 @@ public void testHandler_Wait() throws Exception { /** * Test handler wait stuck. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_WaitStuck() throws Exception { diff --git a/src/test/java/org/kohsuke/github/AppTest.java b/src/test/java/org/kohsuke/github/AppTest.java index 6884eb6cba..f8d7a39892 100755 --- a/src/test/java/org/kohsuke/github/AppTest.java +++ b/src/test/java/org/kohsuke/github/AppTest.java @@ -28,14 +28,15 @@ * Unit test for simple App. */ public class AppTest extends AbstractGitHubWireMockTest { - + /** The Constant GITHUB_API_TEST_REPO. */ static final String GITHUB_API_TEST_REPO = "github-api-test"; /** * Test repo CRUD. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testRepoCRUD() throws Exception { @@ -85,7 +86,8 @@ public void testRepoCRUD() throws Exception { /** * Test repository with auto initialization CRUD. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testRepositoryWithAutoInitializationCRUD() throws Exception { @@ -113,7 +115,8 @@ private void cleanupUserRepository(final String name) throws IOException { /** * Test credential valid. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCredentialValid() throws IOException { @@ -134,7 +137,8 @@ public void testCredentialValid() throws IOException { /** * Test credential valid enterprise. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCredentialValidEnterprise() throws IOException { @@ -160,7 +164,8 @@ public void testCredentialValidEnterprise() throws IOException { /** * Test issue with no comment. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testIssueWithNoComment() throws IOException { @@ -174,7 +179,8 @@ public void testIssueWithNoComment() throws IOException { /** * Test issue with comment. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testIssueWithComment() throws IOException { @@ -238,7 +244,8 @@ public void testIssueWithComment() throws IOException { /** * Test create issue. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateIssue() throws IOException { @@ -270,7 +277,8 @@ public void testCreateIssue() throws IOException { /** * Test create and list deployments. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateAndListDeployments() throws IOException { @@ -301,7 +309,8 @@ public void testCreateAndListDeployments() throws IOException { /** * Test get deployment statuses. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetDeploymentStatuses() throws IOException { @@ -339,7 +348,8 @@ public void testGetDeploymentStatuses() throws IOException { /** * Test get issues. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetIssues() throws Exception { @@ -354,7 +364,8 @@ public void testGetIssues() throws Exception { /** * Test query issues. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testQueryIssues() throws IOException { @@ -434,7 +445,8 @@ private GHRepository getTestRepository() throws IOException { /** * Test list issues. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListIssues() throws IOException { @@ -454,7 +466,8 @@ public void testListIssues() throws IOException { /** * Test rate limit. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testRateLimit() throws IOException { @@ -464,7 +477,8 @@ public void testRateLimit() throws IOException { /** * Test my organizations. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMyOrganizations() throws IOException { @@ -476,7 +490,8 @@ public void testMyOrganizations() throws IOException { /** * Test my organizations contain my teams. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMyOrganizationsContainMyTeams() throws IOException { @@ -490,7 +505,8 @@ public void testMyOrganizationsContainMyTeams() throws IOException { /** * Test my teams should include myself. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMyTeamsShouldIncludeMyself() throws IOException { @@ -508,7 +524,8 @@ public void testMyTeamsShouldIncludeMyself() throws IOException { /** * Test user public organizations when there are some. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testUserPublicOrganizationsWhenThereAreSome() throws IOException { @@ -523,7 +540,8 @@ public void testUserPublicOrganizationsWhenThereAreSome() throws IOException { /** * Test user public organizations when there are none. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testUserPublicOrganizationsWhenThereAreNone() throws IOException { @@ -546,7 +564,8 @@ private boolean shouldBelongToTeam(String organizationName, String teamName) thr /** * Test fetching team from git hub instance throws exception. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @SuppressWarnings("deprecation") @@ -560,7 +579,8 @@ public void testFetchingTeamFromGitHubInstanceThrowsException() throws Exception /** * Test should fetch team from organization. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testShouldFetchTeamFromOrganization() throws Exception { @@ -584,7 +604,8 @@ public void testShouldFetchTeamFromOrganization() throws Exception { /** * Test fetch pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -599,7 +620,8 @@ public void testFetchPullRequest() throws Exception { /** * Test fetch pull request as list. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -615,7 +637,8 @@ public void testFetchPullRequestAsList() throws Exception { /** * Test get app installations. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetAppInstallations() throws Exception { @@ -634,7 +657,8 @@ public void testGetAppInstallations() throws Exception { /** * Test repo permissions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -651,7 +675,8 @@ public void testRepoPermissions() throws Exception { /** * Test get myself. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetMyself() throws Exception { @@ -666,7 +691,8 @@ public void testGetMyself() throws Exception { /** * Test public keys. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -678,7 +704,8 @@ public void testPublicKeys() throws Exception { /** * Test org fork. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testOrgFork() throws Exception { @@ -689,7 +716,8 @@ public void testOrgFork() throws Exception { /** * Test get teams for repo. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetTeamsForRepo() throws Exception { @@ -702,7 +730,8 @@ public void testGetTeamsForRepo() throws Exception { /** * Test membership. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testMembership() throws Exception { @@ -715,7 +744,8 @@ public void testMembership() throws Exception { /** * Test member orgs. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testMemberOrgs() throws Exception { @@ -726,7 +756,8 @@ public void testMemberOrgs() throws Exception { /** * Test org teams. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testOrgTeams() throws Exception { @@ -742,7 +773,8 @@ public void testOrgTeams() throws Exception { /** * Test org team by name. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testOrgTeamByName() throws Exception { @@ -754,7 +786,8 @@ public void testOrgTeamByName() throws Exception { /** * Test org team by slug. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testOrgTeamBySlug() throws Exception { @@ -766,7 +799,8 @@ public void testOrgTeamBySlug() throws Exception { /** * Test commit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCommit() throws Exception { @@ -812,7 +846,8 @@ public void testCommit() throws Exception { /** * Test list commits. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testListCommits() throws Exception { @@ -827,7 +862,8 @@ public void testListCommits() throws Exception { /** * Test branches. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -839,7 +875,8 @@ public void testBranches() throws Exception { /** * Test commit comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCommitComment() throws Exception { @@ -855,7 +892,8 @@ public void testCommitComment() throws Exception { /** * Test create commit comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateCommitComment() throws Exception { @@ -904,7 +942,8 @@ public void testCreateCommitComment() throws Exception { /** * Try hook. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void tryHook() throws Exception { @@ -976,7 +1015,8 @@ public void tryHook() throws Exception { /** * Test event api. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEventApi() throws Exception { @@ -999,7 +1039,8 @@ public void testEventApi() throws Exception { /** * Test app. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Ignore("Needs mocking check") @Test @@ -1096,7 +1137,8 @@ private void testPostCommitHook(GitHub gitHub) throws IOException { /** * Test org repositories. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testOrgRepositories() throws IOException { @@ -1111,7 +1153,8 @@ public void testOrgRepositories() throws IOException { /** * Test organization. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testOrganization() throws IOException { @@ -1127,7 +1170,8 @@ public void testOrganization() throws IOException { /** * Test commit status. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCommitStatus() throws Exception { @@ -1149,7 +1193,8 @@ public void testCommitStatus() throws Exception { /** * Test commit short info. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCommitShortInfo() throws Exception { @@ -1168,7 +1213,8 @@ public void testCommitShortInfo() throws Exception { /** * Test pull request populate. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -1182,7 +1228,8 @@ public void testPullRequestPopulate() throws Exception { /** * Test check membership. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCheckMembership() throws Exception { @@ -1201,7 +1248,8 @@ public void testCheckMembership() throws Exception { /** * Test ref. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testRef() throws IOException { @@ -1213,7 +1261,8 @@ public void testRef() throws IOException { /** * Directory listing. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void directoryListing() throws IOException { @@ -1231,7 +1280,8 @@ public void directoryListing() throws IOException { /** * Test add deploy key. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Ignore("Needs mocking check") @Test @@ -1256,7 +1306,8 @@ public boolean apply(GHDeployKey deployKey) { /** * Test commit status context. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Ignore("Needs mocking check") @Test @@ -1272,7 +1323,8 @@ public void testCommitStatusContext() throws IOException { /** * Test member pagenation. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Ignore("Needs mocking check") @Test @@ -1288,7 +1340,8 @@ public void testMemberPagenation() throws IOException { /** * Test commit search. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCommitSearch() throws IOException { @@ -1307,7 +1360,8 @@ public void testCommitSearch() throws IOException { /** * Test issue search. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testIssueSearch() throws IOException { @@ -1329,7 +1383,8 @@ public void testIssueSearch() throws IOException { /** * Test readme. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test // issue #99 public void testReadme() throws IOException { @@ -1341,7 +1396,8 @@ public void testReadme() throws IOException { /** * Test trees. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Ignore("Needs mocking check") @Test @@ -1360,7 +1416,8 @@ public void testTrees() throws IOException { /** * Test trees recursive. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testTreesRecursive() throws IOException { @@ -1388,7 +1445,8 @@ public void testTreesRecursive() throws IOException { /** * Test repo label. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testRepoLabel() throws IOException { @@ -1502,7 +1560,8 @@ public void testRepoLabel() throws IOException { /** * Cleanup label. * - * @param name the name + * @param name + * the name */ void cleanupLabel(String name) { if (mockGitHub.isUseProxy()) { @@ -1518,7 +1577,8 @@ void cleanupLabel(String name) { /** * Test subscribers. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testSubscribers() throws IOException { @@ -1539,7 +1599,8 @@ public void testSubscribers() throws IOException { /** * Notifications. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void notifications() throws Exception { @@ -1576,7 +1637,8 @@ public void notifications() throws Exception { /** * Check to string. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Needs mocking check") @Test @@ -1592,7 +1654,8 @@ public void checkToString() throws Exception { /** * Reactions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void reactions() throws Exception { @@ -1657,7 +1720,8 @@ public void reactions() throws Exception { /** * List org memberships. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listOrgMemberships() throws Exception { @@ -1672,7 +1736,8 @@ public void listOrgMemberships() throws Exception { /** * Blob. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void blob() throws Exception { diff --git a/src/test/java/org/kohsuke/github/ArchTests.java b/src/test/java/org/kohsuke/github/ArchTests.java index 78d389e6c9..598b6383d4 100644 --- a/src/test/java/org/kohsuke/github/ArchTests.java +++ b/src/test/java/org/kohsuke/github/ArchTests.java @@ -154,8 +154,10 @@ public void testRequireUseOfOnlySpecificApacheCommons() { /** * Not call methods in package unless. * - * @param packageIdentifier the package identifier - * @param unlessPredicates the unless predicates + * @param packageIdentifier + * the package identifier + * @param unlessPredicates + * the unless predicates * @return the arch condition */ public static ArchCondition notCallMethodsInPackageUnless(final String packageIdentifier, @@ -176,9 +178,12 @@ public static ArchCondition notCallMethodsInPackageUnless(final Strin /** * Target method is. * - * @param owner the owner - * @param methodName the method name - * @param parameterTypes the parameter types + * @param owner + * the owner + * @param methodName + * the method name + * @param parameterTypes + * the parameter types * @return the described predicate */ public static DescribedPredicate> targetMethodIs(Class owner, @@ -194,9 +199,12 @@ public static DescribedPredicate> targetMethodIs(Class owner, /** * Unless. * - * @param the generic type - * @param first the first - * @param second the second + * @param + * the generic type + * @param first + * the first + * @param second + * the second * @return the described predicate */ public static DescribedPredicate unless(DescribedPredicate first, diff --git a/src/test/java/org/kohsuke/github/BridgeMethodTest.java b/src/test/java/org/kohsuke/github/BridgeMethodTest.java index d940d1ce59..eb9138eda4 100644 --- a/src/test/java/org/kohsuke/github/BridgeMethodTest.java +++ b/src/test/java/org/kohsuke/github/BridgeMethodTest.java @@ -26,7 +26,8 @@ public class BridgeMethodTest extends Assert { /** * Test bridge methods. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testBridgeMethods() throws IOException { @@ -66,9 +67,12 @@ public void testBridgeMethods() throws IOException { /** * Verify bridge methods. * - * @param targetClass the target class - * @param methodName the method name - * @param returnTypes the return types + * @param targetClass + * the target class + * @param methodName + * the method name + * @param returnTypes + * the return types */ void verifyBridgeMethods(@Nonnull Class targetClass, @Nonnull String methodName, Class... returnTypes) { verifyBridgeMethods(targetClass, methodName, 0, returnTypes); @@ -77,10 +81,14 @@ void verifyBridgeMethods(@Nonnull Class targetClass, @Nonnull String methodNa /** * Verify bridge methods. * - * @param targetClass the target class - * @param methodName the method name - * @param parameterCount the parameter count - * @param returnTypes the return types + * @param targetClass + * the target class + * @param methodName + * the method name + * @param parameterCount + * the parameter count + * @param returnTypes + * the return types */ void verifyBridgeMethods(@Nonnull Class targetClass, @Nonnull String methodName, diff --git a/src/test/java/org/kohsuke/github/CommitTest.java b/src/test/java/org/kohsuke/github/CommitTest.java index da5f22e66f..81f83f28ba 100644 --- a/src/test/java/org/kohsuke/github/CommitTest.java +++ b/src/test/java/org/kohsuke/github/CommitTest.java @@ -18,11 +18,12 @@ * @author Kohsuke Kawaguchi */ public class CommitTest extends AbstractGitHubWireMockTest { - + /** * Last status. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test // issue 152 public void lastStatus() throws IOException { @@ -33,7 +34,8 @@ public void lastStatus() throws IOException { /** * List files. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // issue 230 public void listFiles() throws Exception { @@ -48,7 +50,8 @@ public void listFiles() throws Exception { /** * Test query commits. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testQueryCommits() throws Exception { @@ -134,7 +137,8 @@ public void testQueryCommits() throws Exception { /** * List pull requests of not included commit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listPullRequestsOfNotIncludedCommit() throws Exception { @@ -149,7 +153,8 @@ public void listPullRequestsOfNotIncludedCommit() throws Exception { /** * List pull requests. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listPullRequests() throws Exception { @@ -169,7 +174,8 @@ public void listPullRequests() throws Exception { /** * List pull requests of commit with 2 pull requests. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listPullRequestsOfCommitWith2PullRequests() throws Exception { @@ -190,7 +196,8 @@ public void listPullRequestsOfCommitWith2PullRequests() throws Exception { /** * List branches where head. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listBranchesWhereHead() throws Exception { @@ -210,7 +217,8 @@ public void listBranchesWhereHead() throws Exception { /** * List branches where head 2 heads. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listBranchesWhereHead2Heads() throws Exception { @@ -226,7 +234,8 @@ public void listBranchesWhereHead2Heads() throws Exception { /** * List branches where head of commit with head nowhere. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listBranchesWhereHeadOfCommitWithHeadNowhere() throws Exception { @@ -241,7 +250,8 @@ public void listBranchesWhereHeadOfCommitWithHeadNowhere() throws Exception { /** * Commit signature verification. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // issue 737 public void commitSignatureVerification() throws Exception { @@ -263,7 +273,8 @@ public void commitSignatureVerification() throws Exception { /** * Commit date not null. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // issue 883 public void commitDateNotNull() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHAppInstallationTest.java b/src/test/java/org/kohsuke/github/GHAppInstallationTest.java index ba70a6a21f..a54535eb08 100644 --- a/src/test/java/org/kohsuke/github/GHAppInstallationTest.java +++ b/src/test/java/org/kohsuke/github/GHAppInstallationTest.java @@ -16,7 +16,8 @@ public class GHAppInstallationTest extends AbstractGHAppInstallationTest { /** * Test list repositories two repos. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListRepositoriesTwoRepos() throws IOException { @@ -32,7 +33,8 @@ public void testListRepositoriesTwoRepos() throws IOException { /** * Test list repositories no permissions. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListRepositoriesNoPermissions() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHAppTest.java b/src/test/java/org/kohsuke/github/GHAppTest.java index 19755b9075..91c1bb9d17 100644 --- a/src/test/java/org/kohsuke/github/GHAppTest.java +++ b/src/test/java/org/kohsuke/github/GHAppTest.java @@ -39,8 +39,8 @@ protected GitHubBuilder getGitHubBuilder() { /** * Gets the git hub app. * - * @return the git hub app - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getGitHubApp() throws IOException { @@ -72,7 +72,8 @@ public void getGitHubApp() throws IOException { /** * List installations. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listInstallations() throws IOException { @@ -87,8 +88,8 @@ public void listInstallations() throws IOException { /** * Gets the installation by id. * - * @return the installation by id - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getInstallationById() throws IOException { @@ -100,8 +101,8 @@ public void getInstallationById() throws IOException { /** * Gets the installation by organization. * - * @return the installation by organization - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getInstallationByOrganization() throws IOException { @@ -113,8 +114,8 @@ public void getInstallationByOrganization() throws IOException { /** * Gets the installation by repository. * - * @return the installation by repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getInstallationByRepository() throws IOException { @@ -126,8 +127,8 @@ public void getInstallationByRepository() throws IOException { /** * Gets the installation by user. * - * @return the installation by user - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getInstallationByUser() throws IOException { @@ -139,7 +140,8 @@ public void getInstallationByUser() throws IOException { /** * Delete installation. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void deleteInstallation() throws IOException { @@ -155,7 +157,8 @@ public void deleteInstallation() throws IOException { /** * Creates the token. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void createToken() throws IOException { @@ -205,7 +208,8 @@ public void createToken() throws IOException { /** * Creates the token with repositories. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void createTokenWithRepositories() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHAuthenticatedAppInstallationTest.java b/src/test/java/org/kohsuke/github/GHAuthenticatedAppInstallationTest.java index 667be7dabb..f02bf5814b 100644 --- a/src/test/java/org/kohsuke/github/GHAuthenticatedAppInstallationTest.java +++ b/src/test/java/org/kohsuke/github/GHAuthenticatedAppInstallationTest.java @@ -30,7 +30,8 @@ protected GitHubBuilder getGitHubBuilder() { /** * Test list repositories two repos. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListRepositoriesTwoRepos() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java b/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java index a5501b7a41..3624068ee5 100755 --- a/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java +++ b/src/test/java/org/kohsuke/github/GHBranchProtectionTest.java @@ -23,7 +23,8 @@ public class GHBranchProtectionTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -34,7 +35,8 @@ public void setUp() throws Exception { /** * Test enable branch protections. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEnableBranchProtections() throws Exception { @@ -75,7 +77,8 @@ private void verifyBranchProtection(GHBranchProtection protection) { /** * Test enable protection only. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEnableProtectionOnly() throws Exception { @@ -86,7 +89,8 @@ public void testEnableProtectionOnly() throws Exception { /** * Test disable protection only. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testDisableProtectionOnly() throws Exception { @@ -99,7 +103,8 @@ public void testDisableProtectionOnly() throws Exception { /** * Test enable require reviews only. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEnableRequireReviewsOnly() throws Exception { @@ -124,7 +129,8 @@ public void testEnableRequireReviewsOnly() throws Exception { /** * Test signed commits. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testSignedCommits() throws Exception { @@ -142,7 +148,8 @@ public void testSignedCommits() throws Exception { /** * Test get protection. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetProtection() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHBranchTest.java b/src/test/java/org/kohsuke/github/GHBranchTest.java index e960ced428..f28554160d 100644 --- a/src/test/java/org/kohsuke/github/GHBranchTest.java +++ b/src/test/java/org/kohsuke/github/GHBranchTest.java @@ -17,7 +17,8 @@ public class GHBranchTest extends AbstractGitHubWireMockTest { /** * Test merge branch. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testMergeBranch() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java b/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java index 8d61a9671d..9f8f11571e 100644 --- a/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java +++ b/src/test/java/org/kohsuke/github/GHCheckRunBuilderTest.java @@ -43,7 +43,8 @@ public class GHCheckRunBuilderTest extends AbstractGHAppInstallationTest { * Gets the installation github. * * @return the installation github - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GitHub getInstallationGithub() throws IOException { return getAppInstallationWithToken(jwtProvider3.getEncodedAuthorization()).root(); @@ -52,7 +53,8 @@ protected GitHub getInstallationGithub() throws IOException { /** * Creates the check run. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createCheckRun() throws Exception { @@ -83,7 +85,8 @@ public void createCheckRun() throws Exception { /** * Creates the check run many annotations. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createCheckRunManyAnnotations() throws Exception { @@ -110,7 +113,8 @@ public void createCheckRunManyAnnotations() throws Exception { /** * Creates the check run no annotations. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createCheckRunNoAnnotations() throws Exception { @@ -127,7 +131,8 @@ public void createCheckRunNoAnnotations() throws Exception { /** * Creates the pending check run. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createPendingCheckRun() throws Exception { @@ -143,7 +148,8 @@ public void createPendingCheckRun() throws Exception { /** * Creates the check run err missing conclusion. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createCheckRunErrMissingConclusion() throws Exception { @@ -164,7 +170,8 @@ public void createCheckRunErrMissingConclusion() throws Exception { /** * Update check run. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void updateCheckRun() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java index 7f6ae2abe3..580675b10d 100644 --- a/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java +++ b/src/test/java/org/kohsuke/github/GHContentIntegrationTest.java @@ -32,7 +32,8 @@ public class GHContentIntegrationTest extends AbstractGitHubWireMockTest { /** * Cleanup. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -52,7 +53,8 @@ public void cleanup() throws Exception { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -62,7 +64,8 @@ public void setUp() throws Exception { /** * Test get repository. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetRepository() throws Exception { @@ -75,7 +78,8 @@ public void testGetRepository() throws Exception { /** * Test get file content. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetFileContent() throws Exception { @@ -89,7 +93,8 @@ public void testGetFileContent() throws Exception { /** * Test get empty file content. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetEmptyFileContent() throws Exception { @@ -102,7 +107,8 @@ public void testGetEmptyFileContent() throws Exception { /** * Test get directory content. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetDirectoryContent() throws Exception { @@ -114,7 +120,8 @@ public void testGetDirectoryContent() throws Exception { /** * Test get directory content trailing slash. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetDirectoryContentTrailingSlash() throws Exception { @@ -127,7 +134,8 @@ public void testGetDirectoryContentTrailingSlash() throws Exception { /** * Test CRUD content. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCRUDContent() throws Exception { @@ -205,11 +213,15 @@ public void testCRUDContent() throws Exception { /** * Check created commits. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws Exception the exception + * @throws Exception + * the exception */ int checkCreatedCommits(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws Exception { expectedRequestCount = checkBasicCommitInfo(gitCommit, ghCommit, expectedRequestCount); @@ -239,9 +251,11 @@ int checkCreatedCommits(GitCommit gitCommit, GHCommit ghCommit, int expectedRequ /** * Gets the GH commit. * - * @param resp the resp + * @param resp + * the resp * @return the GH commit - * @throws Exception the exception + * @throws Exception + * the exception */ GHCommit getGHCommit(GHContentUpdateResponse resp) throws Exception { for (Method method : resp.getClass().getMethods()) { @@ -256,11 +270,15 @@ GHCommit getGHCommit(GHContentUpdateResponse resp) throws Exception { /** * Check updated content response commits. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws Exception the exception + * @throws Exception + * the exception */ int checkUpdatedContentResponseCommits(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws Exception { @@ -289,11 +307,15 @@ int checkUpdatedContentResponseCommits(GitCommit gitCommit, GHCommit ghCommit, i /** * Check basic commit info. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ int checkBasicCommitInfo(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws IOException { assertThat(gitCommit, notNullValue()); @@ -316,11 +338,15 @@ int checkBasicCommitInfo(GitCommit gitCommit, GHCommit ghCommit, int expectedReq /** * Check commit user info. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws Exception the exception + * @throws Exception + * the exception */ int checkCommitUserInfo(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws Exception { assertThat(gitCommit.getAuthor().getName(), equalTo("Liam Newman")); @@ -352,12 +378,17 @@ int checkCommitUserInfo(GitCommit gitCommit, GHCommit ghCommit, int expectedRequ /** * Gets the GH author. * - * @param commit the commit + * @param commit + * the commit * @return the GH author - * @throws GHException the GH exception - * @throws IllegalAccessException the illegal access exception - * @throws IllegalArgumentException the illegal argument exception - * @throws InvocationTargetException the invocation target exception + * @throws GHException + * the GH exception + * @throws IllegalAccessException + * the illegal access exception + * @throws IllegalArgumentException + * the illegal argument exception + * @throws InvocationTargetException + * the invocation target exception */ GHCommit.GHAuthor getGHAuthor(GitCommit commit) throws GHException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { @@ -373,12 +404,17 @@ GHCommit.GHAuthor getGHAuthor(GitCommit commit) /** * Gets the GH author. * - * @param commit the commit + * @param commit + * the commit * @return the GH author - * @throws GHException the GH exception - * @throws IllegalAccessException the illegal access exception - * @throws IllegalArgumentException the illegal argument exception - * @throws InvocationTargetException the invocation target exception + * @throws GHException + * the GH exception + * @throws IllegalAccessException + * the illegal access exception + * @throws IllegalArgumentException + * the illegal argument exception + * @throws InvocationTargetException + * the invocation target exception */ GHCommit.GHAuthor getGHAuthor(GHCommit.ShortInfo commit) throws GHException, IllegalAccessException, IllegalArgumentException, InvocationTargetException { @@ -394,11 +430,15 @@ GHCommit.GHAuthor getGHAuthor(GHCommit.ShortInfo commit) /** * Check commit tree. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ int checkCommitTree(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws IOException { assertThat(gitCommit.getTreeSHA1(), notNullValue()); @@ -420,11 +460,15 @@ int checkCommitTree(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestC /** * Check commit parents. * - * @param gitCommit the git commit - * @param ghCommit the gh commit - * @param expectedRequestCount the expected request count + * @param gitCommit + * the git commit + * @param ghCommit + * the gh commit + * @param expectedRequestCount + * the expected request count * @return the int - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ int checkCommitParents(GitCommit gitCommit, GHCommit ghCommit, int expectedRequestCount) throws IOException { assertThat(gitCommit.getParentSHA1s().size(), is(greaterThan(0))); @@ -442,7 +486,8 @@ int checkCommitParents(GitCommit gitCommit, GHCommit ghCommit, int expectedReque /** * Test MIME small. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMIMESmall() throws IOException { @@ -457,7 +502,8 @@ public void testMIMESmall() throws IOException { /** * Test MIME long. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMIMELong() throws IOException { @@ -468,11 +514,12 @@ public void testMIMELong() throws IOException { ghContentBuilder.content("1234567890123456789012345678901234567890123456789012345678"); ghContentBuilder.commit(); } - + /** * Test MIME longer. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testMIMELonger() throws IOException { @@ -490,7 +537,8 @@ public void testMIMELonger() throws IOException { /** * Test get file content with non ascii path. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetFileContentWithNonAsciiPath() throws Exception { @@ -505,7 +553,8 @@ public void testGetFileContentWithNonAsciiPath() throws Exception { /** * Test get file content with symlink. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGetFileContentWithSymlink() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHDeploymentTest.java b/src/test/java/org/kohsuke/github/GHDeploymentTest.java index f7f308f61b..32be0ceadd 100644 --- a/src/test/java/org/kohsuke/github/GHDeploymentTest.java +++ b/src/test/java/org/kohsuke/github/GHDeploymentTest.java @@ -19,7 +19,8 @@ public class GHDeploymentTest extends AbstractGitHubWireMockTest { /** * Test get deployment by id string payload. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetDeploymentByIdStringPayload() throws IOException { @@ -41,7 +42,8 @@ public void testGetDeploymentByIdStringPayload() throws IOException { /** * Test get deployment by id object payload. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetDeploymentByIdObjectPayload() throws IOException { @@ -68,7 +70,8 @@ public void testGetDeploymentByIdObjectPayload() throws IOException { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHDiscussionTest.java b/src/test/java/org/kohsuke/github/GHDiscussionTest.java index 3b9ce4f95a..c2ea7f270b 100644 --- a/src/test/java/org/kohsuke/github/GHDiscussionTest.java +++ b/src/test/java/org/kohsuke/github/GHDiscussionTest.java @@ -23,7 +23,8 @@ public class GHDiscussionTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -33,7 +34,8 @@ public void setUp() throws Exception { /** * Cleanup discussions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @After public void cleanupDiscussions() throws Exception { @@ -50,7 +52,8 @@ public void cleanupDiscussions() throws Exception { /** * Test created discussion. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreatedDiscussion() throws IOException { @@ -94,7 +97,8 @@ public void testCreatedDiscussion() throws IOException { /** * Test get and edit discussion. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetAndEditDiscussion() throws IOException { @@ -142,7 +146,8 @@ public void testGetAndEditDiscussion() throws IOException { /** * Test list discussion. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListDiscussion() throws IOException { @@ -157,7 +162,8 @@ public void testListDiscussion() throws IOException { /** * Test to delete discussion. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testToDeleteDiscussion() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java index 725dc07fd6..c612a700c4 100644 --- a/src/test/java/org/kohsuke/github/GHEventPayloadTest.java +++ b/src/test/java/org/kohsuke/github/GHEventPayloadTest.java @@ -47,7 +47,8 @@ public GHEventPayloadTest() { /** * Commit comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void commit_comment() throws Exception { @@ -73,7 +74,8 @@ public void commit_comment() throws Exception { /** * Creates the. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void create() throws Exception { @@ -91,7 +93,8 @@ public void create() throws Exception { /** * Delete. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void delete() throws Exception { @@ -107,7 +110,8 @@ public void delete() throws Exception { /** * Deployment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void deployment() throws Exception { @@ -126,7 +130,8 @@ public void deployment() throws Exception { /** * Deployment status. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void deployment_status() throws Exception { @@ -151,7 +156,8 @@ public void deployment_status() throws Exception { /** * Fork. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void fork() throws Exception { @@ -187,7 +193,8 @@ public void fork() throws Exception { /** * Issue comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_comment() throws Exception { @@ -215,7 +222,8 @@ public void issue_comment() throws Exception { /** * Issue comment edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_comment_edited() throws Exception { @@ -229,7 +237,8 @@ public void issue_comment_edited() throws Exception { /** * Issues. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issues() throws Exception { @@ -251,7 +260,8 @@ public void issues() throws Exception { /** * Issue labeled. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_labeled() throws Exception { @@ -268,7 +278,8 @@ public void issue_labeled() throws Exception { /** * Issue unlabeled. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_unlabeled() throws Exception { @@ -284,7 +295,8 @@ public void issue_unlabeled() throws Exception { /** * Issue title edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_title_edited() throws Exception { @@ -299,7 +311,8 @@ public void issue_title_edited() throws Exception { /** * Issue body edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issue_body_edited() throws Exception { @@ -334,7 +347,8 @@ public void issue_body_edited() throws Exception { /** * Ping. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void ping() throws Exception { @@ -350,7 +364,8 @@ public void ping() throws Exception { /** * Public. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("public") @@ -365,7 +380,8 @@ public void public_() throws Exception { /** * Pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request() throws Exception { @@ -405,7 +421,8 @@ public void pull_request() throws Exception { /** * Pull request edited base. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_edited_base() throws Exception { @@ -425,7 +442,8 @@ public void pull_request_edited_base() throws Exception { /** * Pull request edited title. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_edited_title() throws Exception { @@ -444,7 +462,8 @@ public void pull_request_edited_title() throws Exception { /** * Pull request labeled. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_labeled() throws Exception { @@ -489,7 +508,8 @@ public void pull_request_labeled() throws Exception { /** * Pull request review. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_review() throws Exception { @@ -528,7 +548,8 @@ public void pull_request_review() throws Exception { /** * Pull request review comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_review_comment() throws Exception { @@ -564,7 +585,8 @@ public void pull_request_review_comment() throws Exception { /** * Pull request review comment edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pull_request_review_comment_edited() throws Exception { @@ -579,7 +601,8 @@ public void pull_request_review_comment_edited() throws Exception { /** * Push. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void push() throws Exception { @@ -623,7 +646,8 @@ public void push() throws Exception { /** * Push to fork. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("push.fork") @@ -698,7 +722,8 @@ public void pushToFork() throws Exception { /** * Release published. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void release_published() throws Exception { @@ -720,7 +745,8 @@ public void release_published() throws Exception { /** * Repository. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void repository() throws Exception { @@ -736,7 +762,8 @@ public void repository() throws Exception { /** * Status. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void status() throws Exception { @@ -757,7 +784,8 @@ public void status() throws Exception { /** * Status 2. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void status2() throws Exception { @@ -779,7 +807,8 @@ public void status2() throws Exception { /** * Check run event. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("check-run") @@ -852,7 +881,8 @@ private GHCheckRun verifyBasicCheckRunEvent(final GHEventPayload.CheckRun event) /** * Check suite event. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("check-suite") @@ -917,7 +947,8 @@ private GHCheckSuite verifyBasicCheckSuiteEvent(final GHEventPayload.CheckSuite /** * Installation repositories event. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("installation_repositories") @@ -943,7 +974,8 @@ public void InstallationRepositoriesEvent() throws Exception { /** * Installation event. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Payload("installation") @@ -969,7 +1001,8 @@ public void InstallationEvent() throws Exception { /** * Workflow dispatch. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void workflow_dispatch() throws Exception { @@ -989,7 +1022,8 @@ public void workflow_dispatch() throws Exception { /** * Workflow run. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void workflow_run() throws Exception { @@ -1059,7 +1093,8 @@ public void workflow_run() throws Exception { /** * Workflow run pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void workflow_run_pull_request() throws Exception { @@ -1077,7 +1112,8 @@ public void workflow_run_pull_request() throws Exception { /** * Workflow run other repository. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void workflow_run_other_repository() throws Exception { @@ -1095,7 +1131,8 @@ public void workflow_run_other_repository() throws Exception { /** * Workflow job. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void workflow_job() throws Exception { @@ -1134,7 +1171,8 @@ public void workflow_job() throws Exception { /** * Label created. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void label_created() throws Exception { @@ -1155,7 +1193,8 @@ public void label_created() throws Exception { /** * Label edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void label_edited() throws Exception { @@ -1179,7 +1218,8 @@ public void label_edited() throws Exception { /** * Label deleted. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void label_deleted() throws Exception { @@ -1200,7 +1240,8 @@ public void label_deleted() throws Exception { /** * Discussion created. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void discussion_created() throws Exception { @@ -1253,7 +1294,8 @@ public void discussion_created() throws Exception { /** * Discussion answered. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void discussion_answered() throws Exception { @@ -1307,7 +1349,8 @@ public void discussion_answered() throws Exception { /** * Discussion labeled. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void discussion_labeled() throws Exception { @@ -1370,7 +1413,8 @@ public void discussion_labeled() throws Exception { /** * Starred. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void starred() throws Exception { @@ -1386,7 +1430,8 @@ public void starred() throws Exception { /** * Projectsv 2 item created. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void projectsv2item_created() throws Exception { @@ -1422,7 +1467,8 @@ public void projectsv2item_created() throws Exception { /** * Projectsv 2 item edited. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void projectsv2item_edited() throws Exception { @@ -1444,7 +1490,8 @@ public void projectsv2item_edited() throws Exception { /** * Projectsv 2 item archived. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void projectsv2item_archived() throws Exception { @@ -1465,7 +1512,8 @@ public void projectsv2item_archived() throws Exception { /** * Projectsv 2 item restored. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void projectsv2item_restored() throws Exception { @@ -1486,7 +1534,8 @@ public void projectsv2item_restored() throws Exception { /** * Projectsv 2 item reordered. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void projectsv2item_reordered() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHGistTest.java b/src/test/java/org/kohsuke/github/GHGistTest.java index 426d246b74..142247a18f 100644 --- a/src/test/java/org/kohsuke/github/GHGistTest.java +++ b/src/test/java/org/kohsuke/github/GHGistTest.java @@ -13,11 +13,12 @@ * @author Kohsuke Kawaguchi */ public class GHGistTest extends AbstractGitHubWireMockTest { - + /** * Lifecycle test. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void lifecycleTest() throws Exception { @@ -108,7 +109,8 @@ public void lifecycleTest() throws Exception { /** * Star test. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void starTest() throws Exception { @@ -143,7 +145,8 @@ public void starTest() throws Exception { /** * Gist file. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void gistFile() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java b/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java index a90c872f59..5ec2590c59 100644 --- a/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java +++ b/src/test/java/org/kohsuke/github/GHGistUpdaterTest.java @@ -22,7 +22,8 @@ public class GHGistUpdaterTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Before public void setUp() throws IOException { @@ -39,7 +40,8 @@ public void setUp() throws IOException { /** * Clean up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @After public void cleanUp() throws Exception { @@ -54,7 +56,8 @@ public void cleanUp() throws Exception { /** * Test git updater. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitUpdater() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHHookTest.java b/src/test/java/org/kohsuke/github/GHHookTest.java index ff910165c1..247505fb1d 100644 --- a/src/test/java/org/kohsuke/github/GHHookTest.java +++ b/src/test/java/org/kohsuke/github/GHHookTest.java @@ -27,7 +27,8 @@ public class GHHookTest { /** * Expose responce headers. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore @Test diff --git a/src/test/java/org/kohsuke/github/GHIssueEventAttributeTest.java b/src/test/java/org/kohsuke/github/GHIssueEventAttributeTest.java index d86b17fd55..58f0587e74 100644 --- a/src/test/java/org/kohsuke/github/GHIssueEventAttributeTest.java +++ b/src/test/java/org/kohsuke/github/GHIssueEventAttributeTest.java @@ -56,7 +56,8 @@ private List listEvents(final Type type) throws IOException { /** * Test event specific attributes. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEventSpecificAttributes() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHIssueEventTest.java b/src/test/java/org/kohsuke/github/GHIssueEventTest.java index 7e3393747c..6ff51e0a46 100644 --- a/src/test/java/org/kohsuke/github/GHIssueEventTest.java +++ b/src/test/java/org/kohsuke/github/GHIssueEventTest.java @@ -19,7 +19,8 @@ public class GHIssueEventTest extends AbstractGitHubWireMockTest { /** * Test events for single issue. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEventsForSingleIssue() throws Exception { @@ -51,7 +52,8 @@ public void testEventsForSingleIssue() throws Exception { /** * Test issue review requested event. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testIssueReviewRequestedEvent() throws Exception { @@ -81,7 +83,8 @@ public void testIssueReviewRequestedEvent() throws Exception { /** * Test events for issue rename. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testEventsForIssueRename() throws Exception { @@ -120,7 +123,8 @@ public void testEventsForIssueRename() throws Exception { /** * Test repository events. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testRepositoryEvents() throws Exception { @@ -140,7 +144,8 @@ public void testRepositoryEvents() throws Exception { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHIssueTest.java b/src/test/java/org/kohsuke/github/GHIssueTest.java index c6a23bcedf..b86910cf2f 100644 --- a/src/test/java/org/kohsuke/github/GHIssueTest.java +++ b/src/test/java/org/kohsuke/github/GHIssueTest.java @@ -31,7 +31,8 @@ public class GHIssueTest extends AbstractGitHubWireMockTest { /** * Clean up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -49,7 +50,8 @@ public void cleanUp() throws Exception { /** * Creates the issue. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createIssue() throws Exception { @@ -62,7 +64,8 @@ public void createIssue() throws Exception { /** * Issue comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void issueComment() throws Exception { @@ -145,7 +148,8 @@ public void issueComment() throws Exception { /** * Close issue. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void closeIssue() throws Exception { @@ -160,7 +164,8 @@ public void closeIssue() throws Exception { /** * Sets the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -181,7 +186,8 @@ public void setLabels() throws Exception { /** * Adds the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -215,7 +221,8 @@ public void addLabels() throws Exception { /** * Adds the labels concurrency issue. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -240,7 +247,8 @@ public void addLabelsConcurrencyIssue() throws Exception { /** * Removes the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -279,7 +287,8 @@ public void removeLabels() throws Exception { /** * Sets the assignee. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -294,8 +303,8 @@ public void setAssignee() throws Exception { /** * Gets the user test. * - * @return the user test - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getUserTest() throws IOException { @@ -313,7 +322,8 @@ public void getUserTest() throws IOException { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHLicenseTest.java b/src/test/java/org/kohsuke/github/GHLicenseTest.java index 63c52fefeb..0ae1730b0f 100644 --- a/src/test/java/org/kohsuke/github/GHLicenseTest.java +++ b/src/test/java/org/kohsuke/github/GHLicenseTest.java @@ -43,7 +43,8 @@ public class GHLicenseTest extends AbstractGitHubWireMockTest { /** * Basic test to ensure that the list of licenses from {@link GitHub#listLicenses()} is returned. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void listLicenses() throws IOException { @@ -73,8 +74,8 @@ public void listLicensesCheckIndividualLicense() throws IOException { * Checks that the request for an individual license using {@link GitHub#getLicense(String)} returns expected values * (not all properties are checked). * - * @return the license - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void getLicense() throws IOException { @@ -101,7 +102,8 @@ public void getLicense() throws IOException { * Accesses the 'kohsuke/github-api' repo using {@link GitHub#getRepository(String)} and checks that the license is * correct. * - * @throws IOException if test failss + * @throws IOException + * if test failss */ @Test public void checkRepositoryLicense() throws IOException { @@ -118,7 +120,8 @@ public void checkRepositoryLicense() throws IOException { /** * Accesses the 'atom/atom' repo using {@link GitHub#getRepository(String)} and checks that the license is correct. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void checkRepositoryLicenseAtom() throws IOException { @@ -133,9 +136,11 @@ public void checkRepositoryLicenseAtom() throws IOException { } /** - * Accesses the 'pomes/pomes' repo using {@link GitHub#getRepository(String)} and checks that the license is correct. + * Accesses the 'pomes/pomes' repo using {@link GitHub#getRepository(String)} and checks that the license is + * correct. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void checkRepositoryLicensePomes() throws IOException { @@ -153,7 +158,8 @@ public void checkRepositoryLicensePomes() throws IOException { * Accesses the 'dedickinson/test-repo' repo using {@link GitHub#getRepository(String)} and checks that *no* license * is returned as the repo doesn't have one. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void checkRepositoryWithoutLicense() throws IOException { @@ -166,7 +172,8 @@ public void checkRepositoryWithoutLicense() throws IOException { * Accesses the 'kohsuke/github-api' repo using {@link GitHub#getRepository(String)} and then calls * {@link GHRepository#getLicense()} and checks that certain properties are correct. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void checkRepositoryFullLicense() throws IOException { @@ -187,7 +194,8 @@ public void checkRepositoryFullLicense() throws IOException { * Accesses the 'pomes/pomes' repo using {@link GitHub#getRepository(String)} and then calls * {@link GHRepository#getLicenseContent()} and checks that certain properties are correct. * - * @throws IOException if test fails + * @throws IOException + * if test fails */ @Test public void checkRepositoryLicenseContent() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java b/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java index 6f690b2949..7ae705a99c 100644 --- a/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java +++ b/src/test/java/org/kohsuke/github/GHMarketplacePlanTest.java @@ -33,7 +33,8 @@ protected GitHubBuilder getGitHubBuilder() { /** * List marketplace plans. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listMarketplacePlans() throws IOException { @@ -45,7 +46,8 @@ public void listMarketplacePlans() throws IOException { /** * List accounts. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listAccounts() throws IOException { @@ -59,7 +61,8 @@ public void listAccounts() throws IOException { /** * List accounts with direction. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listAccountsWithDirection() throws IOException { @@ -80,7 +83,8 @@ public void listAccountsWithDirection() throws IOException { /** * List accounts with sort and direction. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listAccountsWithSortAndDirection() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHMilestoneTest.java b/src/test/java/org/kohsuke/github/GHMilestoneTest.java index a6ab97c745..f5da382cc2 100644 --- a/src/test/java/org/kohsuke/github/GHMilestoneTest.java +++ b/src/test/java/org/kohsuke/github/GHMilestoneTest.java @@ -21,7 +21,8 @@ public class GHMilestoneTest extends AbstractGitHubWireMockTest { /** * Clean up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -42,7 +43,8 @@ public void cleanUp() throws Exception { /** * Test update milestone. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUpdateMilestone() throws Exception { @@ -76,7 +78,8 @@ public void testUpdateMilestone() throws Exception { /** * Test unset milestone. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testUnsetMilestone() throws IOException { @@ -98,7 +101,8 @@ public void testUnsetMilestone() throws IOException { /** * Test unset milestone from pull request. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testUnsetMilestoneFromPullRequest() throws IOException { @@ -122,7 +126,8 @@ public void testUnsetMilestoneFromPullRequest() throws IOException { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHObjectTest.java b/src/test/java/org/kohsuke/github/GHObjectTest.java index a345932af0..05a8c1ae4e 100644 --- a/src/test/java/org/kohsuke/github/GHObjectTest.java +++ b/src/test/java/org/kohsuke/github/GHObjectTest.java @@ -13,7 +13,8 @@ public class GHObjectTest extends org.kohsuke.github.AbstractGitHubWireMockTest /** * Test to string. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void test_toString() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHOrganizationTest.java b/src/test/java/org/kohsuke/github/GHOrganizationTest.java index 18eb9b20bb..9ec59b301a 100644 --- a/src/test/java/org/kohsuke/github/GHOrganizationTest.java +++ b/src/test/java/org/kohsuke/github/GHOrganizationTest.java @@ -20,17 +20,18 @@ public class GHOrganizationTest extends AbstractGitHubWireMockTest { /** The Constant GITHUB_API_TEST. */ public static final String GITHUB_API_TEST = "github-api-test"; - + /** The Constant GITHUB_API_TEMPLATE_TEST. */ public static final String GITHUB_API_TEMPLATE_TEST = "github-api-template-test"; - + /** The Constant TEAM_NAME_CREATE. */ public static final String TEAM_NAME_CREATE = "create-team-test"; /** * Clean up team. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Before @After @@ -51,7 +52,8 @@ public void cleanUpTeam() throws IOException { /** * Test create repository. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateRepository() throws IOException { @@ -70,7 +72,8 @@ public void testCreateRepository() throws IOException { /** * Test create repository with auto initialization. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateRepositoryWithAutoInitialization() throws IOException { @@ -90,7 +93,8 @@ public void testCreateRepositoryWithAutoInitialization() throws IOException { /** * Test create repository with parameter is template. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateRepositoryWithParameterIsTemplate() throws IOException { @@ -132,7 +136,8 @@ public void testCreateRepositoryWithParameterIsTemplate() throws IOException { /** * Test create repository with template. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateRepositoryWithTemplate() throws IOException { @@ -152,7 +157,8 @@ public void testCreateRepositoryWithTemplate() throws IOException { /** * Test invite user. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testInviteUser() throws IOException { @@ -178,7 +184,8 @@ public void testInviteUser() throws IOException { /** * Test list members with filter. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListMembersWithFilter() throws IOException { @@ -207,7 +214,8 @@ public void testListMembersWithFilter() throws IOException { /** * Test list members with role. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListMembersWithRole() throws IOException { @@ -236,7 +244,8 @@ public void testListMembersWithRole() throws IOException { /** * Test create team with repo access. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateTeamWithRepoAccess() throws IOException { @@ -254,7 +263,8 @@ public void testCreateTeamWithRepoAccess() throws IOException { /** * Test create team with null perm. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateTeamWithNullPerm() throws Exception { @@ -281,7 +291,8 @@ public void testCreateTeamWithNullPerm() throws Exception { /** * Test create team with repo perm. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateTeamWithRepoPerm() throws Exception { @@ -309,7 +320,8 @@ public void testCreateTeamWithRepoPerm() throws Exception { /** * Test create team with repo role. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateTeamWithRepoRole() throws IOException { @@ -338,7 +350,8 @@ public void testCreateTeamWithRepoRole() throws IOException { /** * Test create team. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateTeam() throws IOException { @@ -357,7 +370,8 @@ public void testCreateTeam() throws IOException { /** * Test create visible team. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateVisibleTeam() throws IOException { @@ -370,7 +384,8 @@ public void testCreateVisibleTeam() throws IOException { /** * Test create all args team. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateAllArgsTeam() throws IOException { @@ -391,7 +406,8 @@ public void testCreateAllArgsTeam() throws IOException { /** * Test are organization projects enabled. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testAreOrganizationProjectsEnabled() throws IOException { @@ -408,7 +424,8 @@ public void testAreOrganizationProjectsEnabled() throws IOException { /** * Test enable organization projects. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEnableOrganizationProjects() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHPersonTest.java b/src/test/java/org/kohsuke/github/GHPersonTest.java index 41382a351e..efadce263a 100644 --- a/src/test/java/org/kohsuke/github/GHPersonTest.java +++ b/src/test/java/org/kohsuke/github/GHPersonTest.java @@ -14,11 +14,12 @@ * @author Martin van Zijl */ public class GHPersonTest extends AbstractGitHubWireMockTest { - + /** * Test fields for organization. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testFieldsForOrganization() throws Exception { @@ -31,7 +32,8 @@ public void testFieldsForOrganization() throws Exception { /** * Test fields for user. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testFieldsForUser() throws Exception { @@ -44,7 +46,8 @@ public void testFieldsForUser() throws Exception { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHProjectCardTest.java b/src/test/java/org/kohsuke/github/GHProjectCardTest.java index e44132a617..7370ac9de5 100644 --- a/src/test/java/org/kohsuke/github/GHProjectCardTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectCardTest.java @@ -24,7 +24,8 @@ public class GHProjectCardTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -46,7 +47,8 @@ public void testCreatedCard() { /** * Test edit card note. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEditCardNote() throws IOException { @@ -59,7 +61,8 @@ public void testEditCardNote() throws IOException { /** * Test archive card. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testArchiveCard() throws IOException { @@ -72,7 +75,8 @@ public void testArchiveCard() throws IOException { /** * Test create card from issue. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateCardFromIssue() throws IOException { @@ -91,7 +95,8 @@ public void testCreateCardFromIssue() throws IOException { /** * Test create card from PR. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateCardFromPR() throws IOException { @@ -122,7 +127,8 @@ public void testCreateCardFromPR() throws IOException { /** * Test delete card. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDeleteCard() throws IOException { @@ -138,7 +144,8 @@ public void testDeleteCard() throws IOException { /** * After. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @After public void after() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHProjectColumnTest.java b/src/test/java/org/kohsuke/github/GHProjectColumnTest.java index 18674ef6f3..afbdaf5bbd 100644 --- a/src/test/java/org/kohsuke/github/GHProjectColumnTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectColumnTest.java @@ -23,7 +23,8 @@ public class GHProjectColumnTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -42,7 +43,8 @@ public void testCreatedColumn() { /** * Test edit column name. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEditColumnName() throws IOException { @@ -54,7 +56,8 @@ public void testEditColumnName() throws IOException { /** * Test delete column. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDeleteColumn() throws IOException { @@ -70,7 +73,8 @@ public void testDeleteColumn() throws IOException { /** * After. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @After public void after() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHProjectTest.java b/src/test/java/org/kohsuke/github/GHProjectTest.java index b6ba571567..cf2707e205 100644 --- a/src/test/java/org/kohsuke/github/GHProjectTest.java +++ b/src/test/java/org/kohsuke/github/GHProjectTest.java @@ -21,7 +21,8 @@ public class GHProjectTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -31,7 +32,8 @@ public void setUp() throws Exception { /** * Test created project. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreatedProject() throws IOException { @@ -46,7 +48,8 @@ public void testCreatedProject() throws IOException { /** * Test edit project name. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEditProjectName() throws IOException { @@ -60,7 +63,8 @@ public void testEditProjectName() throws IOException { /** * Test edit project body. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEditProjectBody() throws IOException { @@ -74,7 +78,8 @@ public void testEditProjectBody() throws IOException { /** * Test edit project state. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testEditProjectState() throws IOException { @@ -88,7 +93,8 @@ public void testEditProjectState() throws IOException { /** * Test delete project. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDeleteProject() throws IOException { @@ -104,7 +110,8 @@ public void testDeleteProject() throws IOException { /** * After. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @After public void after() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java b/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java index cceec24e81..852a442cca 100644 --- a/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java +++ b/src/test/java/org/kohsuke/github/GHPullRequestMockTest.java @@ -17,7 +17,8 @@ public class GHPullRequestMockTest { /** * Should mock GH pull request. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void shouldMockGHPullRequest() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHPullRequestTest.java b/src/test/java/org/kohsuke/github/GHPullRequestTest.java index f8fc9816bf..ff8f8ea595 100644 --- a/src/test/java/org/kohsuke/github/GHPullRequestTest.java +++ b/src/test/java/org/kohsuke/github/GHPullRequestTest.java @@ -26,7 +26,8 @@ public class GHPullRequestTest extends AbstractGitHubWireMockTest { /** * Clean up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -44,7 +45,8 @@ public void cleanUp() throws Exception { /** * Creates the pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createPullRequest() throws Exception { @@ -67,7 +69,8 @@ public void createPullRequest() throws Exception { /** * Creates the draft pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createDraftPullRequest() throws Exception { @@ -95,7 +98,8 @@ public void createDraftPullRequest() throws Exception { /** * Pull request comment. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pullRequestComment() throws Exception { @@ -177,7 +181,8 @@ public void pullRequestComment() throws Exception { /** * Close pull request. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void closePullRequest() throws Exception { @@ -193,7 +198,8 @@ public void closePullRequest() throws Exception { /** * Pull request reviews. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pullRequestReviews() throws Exception { @@ -224,7 +230,8 @@ public void pullRequestReviews() throws Exception { /** * Pull request review comments. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void pullRequestReviewComments() throws Exception { @@ -290,7 +297,8 @@ public void pullRequestReviewComments() throws Exception { /** * Test pull request review requests. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testPullRequestReviewRequests() throws Exception { @@ -308,7 +316,8 @@ public void testPullRequestReviewRequests() throws Exception { /** * Test pull request team review requests. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testPullRequestTeamReviewRequests() throws Exception { @@ -342,7 +351,8 @@ public void testPullRequestTeamReviewRequests() throws Exception { /** * Merge commit SHA. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void mergeCommitSHA() throws Exception { @@ -380,7 +390,8 @@ public void mergeCommitSHA() throws Exception { /** * Sets the base branch. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void setBaseBranch() throws Exception { @@ -404,7 +415,8 @@ public void setBaseBranch() throws Exception { /** * Sets the base branch non existing. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void setBaseBranchNonExisting() throws Exception { @@ -431,7 +443,8 @@ public void setBaseBranchNonExisting() throws Exception { /** * Update outdated branches unexpected head. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void updateOutdatedBranchesUnexpectedHead() throws Exception { @@ -468,7 +481,8 @@ public void updateOutdatedBranchesUnexpectedHead() throws Exception { /** * Update outdated branches. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void updateOutdatedBranches() throws Exception { @@ -500,7 +514,8 @@ public void updateOutdatedBranches() throws Exception { /** * Squash merge. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void squashMerge() throws Exception { @@ -519,7 +534,8 @@ public void squashMerge() throws Exception { /** * Update content squash merge. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void updateContentSquashMerge() throws Exception { @@ -547,7 +563,8 @@ public void updateContentSquashMerge() throws Exception { /** * Query pull requests qualified head. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void queryPullRequestsQualifiedHead() throws Exception { @@ -571,7 +588,8 @@ public void queryPullRequestsQualifiedHead() throws Exception { /** * Query pull requests unqualified head. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void queryPullRequestsUnqualifiedHead() throws Exception { @@ -595,7 +613,8 @@ public void queryPullRequestsUnqualifiedHead() throws Exception { /** * Sets the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -616,7 +635,8 @@ public void setLabels() throws Exception { /** * Adds the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -650,7 +670,8 @@ public void addLabels() throws Exception { /** * Adds the labels concurrency issue. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -676,7 +697,8 @@ public void addLabelsConcurrencyIssue() throws Exception { /** * Removes the labels. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -715,7 +737,8 @@ public void removeLabels() throws Exception { /** * Sets the assignee. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // Requires push access to the test repo to pass @@ -730,8 +753,8 @@ public void setAssignee() throws Exception { /** * Gets the user test. * - * @return the user test - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getUserTest() throws IOException { @@ -752,7 +775,8 @@ public void getUserTest() throws IOException { /** * Check non existent reviewer. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void checkNonExistentReviewer() throws IOException { @@ -769,7 +793,8 @@ public void checkNonExistentReviewer() throws IOException { /** * Check non existent author. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void checkNonExistentAuthor() throws IOException { @@ -783,7 +808,8 @@ public void checkNonExistentAuthor() throws IOException { /** * Check pull request reviewer. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void checkPullRequestReviewer() throws IOException { @@ -800,7 +826,8 @@ public void checkPullRequestReviewer() throws IOException { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHRateLimitTest.java b/src/test/java/org/kohsuke/github/GHRateLimitTest.java index 32bb4e985c..7d3001b7a4 100644 --- a/src/test/java/org/kohsuke/github/GHRateLimitTest.java +++ b/src/test/java/org/kohsuke/github/GHRateLimitTest.java @@ -40,7 +40,7 @@ public class GHRateLimitTest extends AbstractGitHubWireMockTest { /** The rate limit. */ GHRateLimit rateLimit = null; - + /** The previous limit. */ GHRateLimit previousLimit = null; @@ -64,7 +64,8 @@ protected WireMockConfiguration getWireMockOptions() { /** * Test git hub rate limit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRateLimit() throws Exception { @@ -254,7 +255,8 @@ private void verifyRateLimitValues(GHRateLimit previousLimit, int remaining, boo /** * Test git hub enterprise does not have rate limit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubEnterpriseDoesNotHaveRateLimit() throws Exception { @@ -439,7 +441,8 @@ public void testGitHubEnterpriseDoesNotHaveRateLimit() throws Exception { /** * Test git hub rate limit with bad data. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRateLimitWithBadData() throws Exception { @@ -472,7 +475,8 @@ public void testGitHubRateLimitWithBadData() throws Exception { /** * Test git hub rate limit expiration server five minutes ahead. * - * @throws Exception the exception + * @throws Exception + * the exception */ // These tests should behave the same, showing server time adjustment working @Test @@ -483,7 +487,8 @@ public void testGitHubRateLimitExpirationServerFiveMinutesAhead() throws Excepti /** * Test git hub rate limit expiration server five minutes behind. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRateLimitExpirationServerFiveMinutesBehind() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHReleaseTest.java b/src/test/java/org/kohsuke/github/GHReleaseTest.java index 570f3b7c4a..b59f0505c2 100644 --- a/src/test/java/org/kohsuke/github/GHReleaseTest.java +++ b/src/test/java/org/kohsuke/github/GHReleaseTest.java @@ -14,7 +14,8 @@ public class GHReleaseTest extends AbstractGitHubWireMockTest { /** * Test create simple release. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateSimpleRelease() throws Exception { @@ -38,7 +39,8 @@ public void testCreateSimpleRelease() throws Exception { /** * Test create simple release without discussion. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateSimpleReleaseWithoutDiscussion() throws Exception { @@ -62,7 +64,8 @@ public void testCreateSimpleReleaseWithoutDiscussion() throws Exception { /** * Test create double release fails. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateDoubleReleaseFails() throws Exception { @@ -90,7 +93,8 @@ public void testCreateDoubleReleaseFails() throws Exception { /** * Test create release with unknown category fails. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateReleaseWithUnknownCategoryFails() throws Exception { @@ -111,7 +115,8 @@ public void testCreateReleaseWithUnknownCategoryFails() throws Exception { /** * Test update release. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUpdateRelease() throws Exception { @@ -142,7 +147,8 @@ public void testUpdateRelease() throws Exception { /** * Test delete release. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testDeleteRelease() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHRepositoryStatisticsTest.java b/src/test/java/org/kohsuke/github/GHRepositoryStatisticsTest.java index 8f2abf495b..56cf3d954a 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryStatisticsTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryStatisticsTest.java @@ -16,15 +16,17 @@ public class GHRepositoryStatisticsTest extends AbstractGitHubWireMockTest { /** The max iterations. */ public static int MAX_ITERATIONS = 3; - + /** The sleep interval. */ public static int SLEEP_INTERVAL = 5000; /** * Test contributor stats. * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws InterruptedException + * the interrupted exception */ @Test public void testContributorStats() throws IOException, InterruptedException { @@ -78,8 +80,10 @@ public void testContributorStats() throws IOException, InterruptedException { /** * Test commit activity. * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws InterruptedException + * the interrupted exception */ @Test @SuppressWarnings("SleepWhileInLoop") @@ -129,8 +133,10 @@ public void testCommitActivity() throws IOException, InterruptedException { /** * Test code frequency. * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws InterruptedException + * the interrupted exception */ @Test @SuppressWarnings("SleepWhileInLoop") @@ -172,8 +178,10 @@ public void testCodeFrequency() throws IOException, InterruptedException { /** * Test participation. * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws InterruptedException + * the interrupted exception */ @Test public void testParticipation() throws IOException, InterruptedException { @@ -208,8 +216,10 @@ public void testParticipation() throws IOException, InterruptedException { /** * Test punch card. * - * @throws IOException Signals that an I/O exception has occurred. - * @throws InterruptedException the interrupted exception + * @throws IOException + * Signals that an I/O exception has occurred. + * @throws InterruptedException + * the interrupted exception */ @Test @SuppressWarnings("SleepWhileInLoop") @@ -251,7 +261,8 @@ public void testPunchCard() throws IOException, InterruptedException { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHRepositoryTest.java b/src/test/java/org/kohsuke/github/GHRepositoryTest.java index c75fd0a254..d85880250e 100644 --- a/src/test/java/org/kohsuke/github/GHRepositoryTest.java +++ b/src/test/java/org/kohsuke/github/GHRepositoryTest.java @@ -37,7 +37,8 @@ public class GHRepositoryTest extends AbstractGitHubWireMockTest { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); @@ -50,7 +51,8 @@ private GHRepository getRepository(GitHub gitHub) throws IOException { /** * Test zipball. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testZipball() throws IOException { @@ -62,7 +64,8 @@ public void testZipball() throws IOException { /** * Test tarball. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testTarball() throws IOException { @@ -74,7 +77,8 @@ public void testTarball() throws IOException { /** * Test getters. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetters() throws IOException { @@ -104,7 +108,8 @@ public void testGetters() throws IOException { /** * Archive. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void archive() throws Exception { @@ -125,7 +130,8 @@ public void archive() throws Exception { /** * Checks if is disabled. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void isDisabled() throws Exception { @@ -137,7 +143,8 @@ public void isDisabled() throws Exception { /** * Checks if is disabled true. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void isDisabledTrue() throws Exception { @@ -149,8 +156,8 @@ public void isDisabledTrue() throws Exception { /** * Gets the branch URL encoded. * - * @return the branch URL encoded - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getBranch_URLEncoded() throws Exception { @@ -162,7 +169,8 @@ public void getBranch_URLEncoded() throws Exception { /** * Creates the signed commit verify error. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void createSignedCommitVerifyError() throws IOException { @@ -184,7 +192,8 @@ public void createSignedCommitVerifyError() throws IOException { /** * Creates the signed commit unknown signature type. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void createSignedCommitUnknownSignatureType() throws IOException { @@ -206,7 +215,8 @@ public void createSignedCommitUnknownSignatureType() throws IOException { /** * List stargazers. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listStargazers() throws IOException { @@ -224,8 +234,8 @@ public void listStargazers() throws IOException { /** * Gets the branch non existent but 200 status. * - * @return the branch non existent but 200 status - * @throws Exception the exception + * @throws Exception + * the exception */ // Issue #607 @Test @@ -251,7 +261,8 @@ public void getBranchNonExistentBut200Status() throws Exception { /** * Subscription. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void subscription() throws Exception { @@ -278,7 +289,8 @@ public void subscription() throws Exception { /** * Test set public. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testSetPublic() throws Exception { @@ -300,7 +312,8 @@ public void testSetPublic() throws Exception { /** * Test update repository. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUpdateRepository() throws Exception { @@ -353,7 +366,8 @@ public void testUpdateRepository() throws Exception { /** * Test get repository with visibility. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetRepositoryWithVisibility() throws IOException { @@ -382,7 +396,8 @@ public void testGetRepositoryWithVisibility() throws IOException { /** * List contributors. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listContributors() throws IOException { @@ -406,8 +421,8 @@ public void listContributors() throws IOException { /** * Gets the permission. * - * @return the permission - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getPermission() throws Exception { @@ -439,7 +454,8 @@ public void getPermission() throws Exception { /** * Checks for permission. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void hasPermission() throws Exception { @@ -488,7 +504,8 @@ public void LatestRepositoryExist() { /** * Adds the collaborators. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void addCollaborators() throws Exception { @@ -509,7 +526,8 @@ public void addCollaborators() throws Exception { /** * Adds the collaborators repo perm. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void addCollaboratorsRepoPerm() throws Exception { @@ -543,7 +561,8 @@ public void LatestRepositoryNotExist() { /** * List releases. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listReleases() throws IOException { @@ -554,8 +573,8 @@ public void listReleases() throws IOException { /** * Gets the release exists. * - * @return the release exists - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getReleaseExists() throws IOException { @@ -566,8 +585,8 @@ public void getReleaseExists() throws IOException { /** * Gets the release does not exist. * - * @return the release does not exist - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getReleaseDoesNotExist() throws IOException { @@ -578,8 +597,8 @@ public void getReleaseDoesNotExist() throws IOException { /** * Gets the release by tag name exists. * - * @return the release by tag name exists - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getReleaseByTagNameExists() throws IOException { @@ -591,8 +610,8 @@ public void getReleaseByTagNameExists() throws IOException { /** * Gets the release by tag name does not exist. * - * @return the release by tag name does not exist - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getReleaseByTagNameDoesNotExist() throws IOException { @@ -603,7 +622,8 @@ public void getReleaseByTagNameDoesNotExist() throws IOException { /** * List languages. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listLanguages() throws IOException { @@ -618,7 +638,8 @@ public void listLanguages() throws IOException { /** * List commit comments no comments. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listCommitCommentsNoComments() throws IOException { @@ -636,7 +657,8 @@ public void listCommitCommentsNoComments() throws IOException { /** * Search all public and forked repos. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void searchAllPublicAndForkedRepos() throws IOException { @@ -654,7 +676,8 @@ public void searchAllPublicAndForkedRepos() throws IOException { /** * Search for public forked only repos. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void searchForPublicForkedOnlyRepos() throws IOException { @@ -749,7 +772,8 @@ public void ghRepositorySearchBuilderForkDeprecatedString() { /** * List commit comments some comments. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listCommitCommentsSomeComments() throws IOException { @@ -773,7 +797,8 @@ public void listCommitCommentsSomeComments() throws IOException { /** * List empty contributors. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test // Issue #261 public void listEmptyContributors() throws IOException { @@ -785,7 +810,8 @@ public void listEmptyContributors() throws IOException { /** * Search repositories. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void searchRepositories() throws Exception { @@ -804,7 +830,8 @@ public void searchRepositories() throws Exception { /** * Search org for repositories. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void searchOrgForRepositories() throws Exception { @@ -817,7 +844,8 @@ public void searchOrgForRepositories() throws Exception { /** * Test issue 162. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test // issue #162 public void testIssue162() throws Exception { @@ -836,7 +864,8 @@ public void testIssue162() throws Exception { /** * Mark down. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void markDown() throws Exception { @@ -856,7 +885,8 @@ public void markDown() throws Exception { /** * Sets the merge options. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void setMergeOptions() throws IOException { @@ -889,8 +919,8 @@ public void setMergeOptions() throws IOException { /** * Gets the delete branch on merge. * - * @return the delete branch on merge - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getDeleteBranchOnMerge() throws IOException { @@ -901,7 +931,8 @@ public void getDeleteBranchOnMerge() throws IOException { /** * Sets the delete branch on merge. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void setDeleteBranchOnMerge() throws IOException { @@ -923,7 +954,8 @@ public void setDeleteBranchOnMerge() throws IOException { /** * Test set topics. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testSetTopics() throws Exception { @@ -963,8 +995,8 @@ public void testSetTopics() throws Exception { /** * Gets the collaborators. * - * @return the collaborators - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getCollaborators() throws Exception { @@ -976,8 +1008,8 @@ public void getCollaborators() throws Exception { /** * Gets the post commit hooks. * - * @return the post commit hooks - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getPostCommitHooks() throws Exception { @@ -989,8 +1021,8 @@ public void getPostCommitHooks() throws Exception { /** * Gets the refs. * - * @return the refs - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getRefs() throws Exception { @@ -1004,8 +1036,8 @@ public void getRefs() throws Exception { /** * Gets the public key. * - * @return the public key - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getPublicKey() throws Exception { @@ -1019,8 +1051,8 @@ public void getPublicKey() throws Exception { /** * Gets the refs heads. * - * @return the refs heads - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getRefsHeads() throws Exception { @@ -1034,8 +1066,8 @@ public void getRefsHeads() throws Exception { /** * Gets the refs empty tags. * - * @return the refs empty tags - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getRefsEmptyTags() throws Exception { @@ -1054,7 +1086,8 @@ public void getRefsEmptyTags() throws Exception { /** * List refs. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listRefs() throws Exception { @@ -1103,8 +1136,8 @@ public void listRefs() throws Exception { /** * Gets the ref. * - * @return the ref - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getRef() throws Exception { @@ -1154,7 +1187,8 @@ public void getRef() throws Exception { /** * List refs heads. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listRefsHeads() throws Exception { @@ -1168,7 +1202,8 @@ public void listRefsHeads() throws Exception { /** * List refs empty tags. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listRefsEmptyTags() throws Exception { @@ -1185,7 +1220,8 @@ public void listRefsEmptyTags() throws Exception { /** * List tags empty. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listTagsEmpty() throws Exception { @@ -1198,7 +1234,8 @@ public void listTagsEmpty() throws Exception { /** * List tags. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listTags() throws Exception { @@ -1211,7 +1248,8 @@ public void listTags() throws Exception { /** * Check watchers count. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void checkWatchersCount() throws Exception { @@ -1224,7 +1262,8 @@ public void checkWatchersCount() throws Exception { /** * Check stargazers count. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void checkStargazersCount() throws Exception { @@ -1237,7 +1276,8 @@ public void checkStargazersCount() throws Exception { /** * List collaborators. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listCollaborators() throws Exception { @@ -1249,7 +1289,8 @@ public void listCollaborators() throws Exception { /** * List collaborators filtered. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listCollaboratorsFiltered() throws Exception { @@ -1263,7 +1304,8 @@ public void listCollaboratorsFiltered() throws Exception { /** * User is collaborator. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void userIsCollaborator() throws Exception { @@ -1275,8 +1317,8 @@ public void userIsCollaborator() throws Exception { /** * Gets the check runs. * - * @return the check runs - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getCheckRuns() throws Exception { @@ -1305,8 +1347,8 @@ public void getCheckRuns() throws Exception { /** * Gets the last commit status. * - * @return the last commit status - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getLastCommitStatus() throws Exception { @@ -1319,7 +1361,8 @@ public void getLastCommitStatus() throws Exception { /** * List commits between. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listCommitsBetween() throws Exception { @@ -1340,7 +1383,8 @@ public void listCommitsBetween() throws Exception { /** * List commits between paginated. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void listCommitsBetweenPaginated() throws Exception { @@ -1362,8 +1406,8 @@ public void listCommitsBetweenPaginated() throws Exception { /** * Gets the commits between over 250. * - * @return the commits between over 250 - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getCommitsBetweenOver250() throws Exception { @@ -1436,8 +1480,8 @@ public void getCommitsBetweenOver250() throws Exception { /** * Gets the commits between paged. * - * @return the commits between paged - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void getCommitsBetweenPaged() throws Exception { @@ -1459,7 +1503,8 @@ public void getCommitsBetweenPaged() throws Exception { /** * Creates the dispatch event without client payload. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createDispatchEventWithoutClientPayload() throws Exception { @@ -1470,7 +1515,8 @@ public void createDispatchEventWithoutClientPayload() throws Exception { /** * Creates the dispatch event with client payload. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createDispatchEventWithClientPayload() throws Exception { @@ -1484,7 +1530,8 @@ public void createDispatchEventWithClientPayload() throws Exception { /** * Creates the secret. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void createSecret() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHTagTest.java b/src/test/java/org/kohsuke/github/GHTagTest.java index 7c58de9303..d4536ed929 100644 --- a/src/test/java/org/kohsuke/github/GHTagTest.java +++ b/src/test/java/org/kohsuke/github/GHTagTest.java @@ -19,7 +19,8 @@ public class GHTagTest extends AbstractGitHubWireMockTest { /** * Clean up tags. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -43,7 +44,8 @@ public void cleanUpTags() throws Exception { /** * Test create tag. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testCreateTag() throws Exception { @@ -74,7 +76,8 @@ public void testCreateTag() throws Exception { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); diff --git a/src/test/java/org/kohsuke/github/GHTeamBuilderTest.java b/src/test/java/org/kohsuke/github/GHTeamBuilderTest.java index 1723ceda58..60148acd7c 100644 --- a/src/test/java/org/kohsuke/github/GHTeamBuilderTest.java +++ b/src/test/java/org/kohsuke/github/GHTeamBuilderTest.java @@ -15,7 +15,8 @@ public class GHTeamBuilderTest extends AbstractGitHubWireMockTest { /** * Test create child team. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateChildTeam() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHTeamTest.java b/src/test/java/org/kohsuke/github/GHTeamTest.java index 08fa04dcab..b1db8ddf0f 100644 --- a/src/test/java/org/kohsuke/github/GHTeamTest.java +++ b/src/test/java/org/kohsuke/github/GHTeamTest.java @@ -24,7 +24,8 @@ public class GHTeamTest extends AbstractGitHubWireMockTest { /** * Test set description. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testSetDescription() throws IOException { @@ -54,8 +55,8 @@ public void testSetDescription() throws IOException { /** * Gets the members. * - * @return the members - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getMembers() throws IOException { @@ -74,7 +75,8 @@ public void getMembers() throws IOException { /** * List members. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listMembers() throws IOException { @@ -93,7 +95,8 @@ public void listMembers() throws IOException { /** * List members admin. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listMembersAdmin() throws IOException { @@ -112,7 +115,8 @@ public void listMembersAdmin() throws IOException { /** * List members no match. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listMembersNoMatch() throws IOException { @@ -128,7 +132,8 @@ public void listMembersNoMatch() throws IOException { /** * Test set privacy. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testSetPrivacy() throws IOException { @@ -158,7 +163,8 @@ public void testSetPrivacy() throws IOException { /** * Test fetch child teams. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testFetchChildTeams() throws IOException { @@ -175,7 +181,8 @@ public void testFetchChildTeams() throws IOException { /** * Test fetch empty child teams. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testFetchEmptyChildTeams() throws IOException { @@ -191,7 +198,8 @@ public void testFetchEmptyChildTeams() throws IOException { /** * Adds the remove member. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void addRemoveMember() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java b/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java index eb284e8b50..a9260cb926 100644 --- a/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java +++ b/src/test/java/org/kohsuke/github/GHTreeBuilderTest.java @@ -37,7 +37,8 @@ public class GHTreeBuilderTest extends AbstractGitHubWireMockTest { /** * Cleanup. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -59,7 +60,8 @@ public void cleanup() throws Exception { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -72,7 +74,8 @@ public void setUp() throws Exception { /** * Test text entry. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test @Ignore("It seems that GitHub no longer supports the 'content' parameter") @@ -89,7 +92,8 @@ public void testTextEntry() throws Exception { /** * Test sha entry. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testShaEntry() throws Exception { @@ -108,7 +112,8 @@ public void testShaEntry() throws Exception { /** * Test add. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testAdd() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHUserTest.java b/src/test/java/org/kohsuke/github/GHUserTest.java index 5fe9f63d7a..61a89a2389 100644 --- a/src/test/java/org/kohsuke/github/GHUserTest.java +++ b/src/test/java/org/kohsuke/github/GHUserTest.java @@ -22,7 +22,8 @@ public class GHUserTest extends AbstractGitHubWireMockTest { /** * Checks if is member of. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void isMemberOf() throws IOException { @@ -48,7 +49,8 @@ public void isMemberOf() throws IOException { /** * List follows and followers. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listFollowsAndFollowers() throws IOException { @@ -69,8 +71,8 @@ private Set count30(PagedIterable l) { /** * Gets the keys. * - * @return the keys - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getKeys() throws IOException { @@ -111,7 +113,8 @@ public int compare(GHKey ghKey, GHKey t1) { /** * List public repositories. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listPublicRepositories() throws IOException { @@ -132,7 +135,8 @@ public void listPublicRepositories() throws IOException { /** * List projects. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listProjects() throws IOException { @@ -148,7 +152,8 @@ public void listProjects() throws IOException { /** * List public repositories page size 62. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listPublicRepositoriesPageSize62() throws IOException { @@ -169,7 +174,8 @@ public void listPublicRepositoriesPageSize62() throws IOException { /** * Creates the and count private repos. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void createAndCountPrivateRepos() throws IOException { @@ -193,7 +199,8 @@ public void createAndCountPrivateRepos() throws IOException { /** * Verify bio and hireable. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void verifyBioAndHireable() throws IOException { @@ -212,7 +219,8 @@ public void verifyBioAndHireable() throws IOException { /** * Verify ldapdn. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void verifyLdapdn() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHVerificationReasonTest.java b/src/test/java/org/kohsuke/github/GHVerificationReasonTest.java index 85f82d318b..73977ef1d4 100644 --- a/src/test/java/org/kohsuke/github/GHVerificationReasonTest.java +++ b/src/test/java/org/kohsuke/github/GHVerificationReasonTest.java @@ -11,11 +11,12 @@ * @author Sourabh Sarvotham Parkala */ public class GHVerificationReasonTest extends AbstractGitHubWireMockTest { - + /** * Test expired key. * - * @throws Exception the exception + * @throws Exception + * the exception */ // Issue 737 @Test @@ -31,7 +32,8 @@ public void testExpiredKey() throws Exception { /** * Test not signing key. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testNotSigningKey() throws Exception { @@ -46,7 +48,8 @@ public void testNotSigningKey() throws Exception { /** * Test gpgverify error. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGpgverifyError() throws Exception { @@ -61,7 +64,8 @@ public void testGpgverifyError() throws Exception { /** * Test gpgverify unavailable. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGpgverifyUnavailable() throws Exception { @@ -76,7 +80,8 @@ public void testGpgverifyUnavailable() throws Exception { /** * Test unsigned. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUnsigned() throws Exception { @@ -90,7 +95,8 @@ public void testUnsigned() throws Exception { /** * Test unknown signature type. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUnknownSignatureType() throws Exception { @@ -105,7 +111,8 @@ public void testUnknownSignatureType() throws Exception { /** * Test no user. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testNoUser() throws Exception { @@ -119,7 +126,8 @@ public void testNoUser() throws Exception { /** * Test unverified email. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUnverifiedEmail() throws Exception { @@ -134,7 +142,8 @@ public void testUnverifiedEmail() throws Exception { /** * Test bad email. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testBadEmail() throws Exception { @@ -148,7 +157,8 @@ public void testBadEmail() throws Exception { /** * Test unknown key. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testUnknownKey() throws Exception { @@ -163,7 +173,8 @@ public void testUnknownKey() throws Exception { /** * Test malformed signature. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testMalformedSignature() throws Exception { @@ -178,7 +189,8 @@ public void testMalformedSignature() throws Exception { /** * Test invalid. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testInvalid() throws Exception { @@ -192,7 +204,8 @@ public void testInvalid() throws Exception { /** * Test valid. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testValid() throws Exception { diff --git a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java index 44d8b43e12..6f555fe02f 100644 --- a/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java +++ b/src/test/java/org/kohsuke/github/GHWorkflowRunTest.java @@ -51,7 +51,8 @@ public class GHWorkflowRunTest extends AbstractGitHubWireMockTest { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -61,7 +62,8 @@ public void setUp() throws Exception { /** * Test manual run and basic information. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testManualRunAndBasicInformation() throws IOException { @@ -112,7 +114,8 @@ public void testManualRunAndBasicInformation() throws IOException { /** * Test cancel and rerun. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCancelAndRerun() throws IOException { @@ -161,7 +164,8 @@ public void testCancelAndRerun() throws IOException { /** * Test delete. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDelete() throws IOException { @@ -198,7 +202,8 @@ public void testDelete() throws IOException { /** * Test search on branch. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testSearchOnBranch() throws IOException { @@ -230,7 +235,8 @@ public void testSearchOnBranch() throws IOException { /** * Test logs. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testLogs() throws IOException { @@ -272,7 +278,8 @@ public void testLogs() throws IOException { /** * Test artifacts. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @SuppressWarnings("resource") @Test @@ -358,7 +365,8 @@ public void testArtifacts() throws IOException { /** * Test jobs. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testJobs() throws IOException { @@ -410,7 +418,8 @@ public void testJobs() throws IOException { /** * Test approval. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testApproval() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GHWorkflowTest.java b/src/test/java/org/kohsuke/github/GHWorkflowTest.java index 362042a20c..cfcca971f3 100644 --- a/src/test/java/org/kohsuke/github/GHWorkflowTest.java +++ b/src/test/java/org/kohsuke/github/GHWorkflowTest.java @@ -28,7 +28,8 @@ public class GHWorkflowTest extends AbstractGitHubWireMockTest { /** * Cleanup. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before @After @@ -47,7 +48,8 @@ public void cleanup() throws Exception { /** * Sets the up. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Before public void setUp() throws Exception { @@ -57,7 +59,8 @@ public void setUp() throws Exception { /** * Test basic information. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testBasicInformation() throws IOException { @@ -81,7 +84,8 @@ public void testBasicInformation() throws IOException { /** * Test disable enable. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDisableEnable() throws IOException { @@ -103,7 +107,8 @@ public void testDisableEnable() throws IOException { /** * Test dispatch. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testDispatch() throws IOException { @@ -124,7 +129,8 @@ public void testDispatch() throws IOException { /** * Test list workflows. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListWorkflows() throws IOException { @@ -147,7 +153,8 @@ public void testListWorkflows() throws IOException { /** * Test list workflow runs. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListWorkflowRuns() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GitHubConnectionTest.java b/src/test/java/org/kohsuke/github/GitHubConnectionTest.java index 4a48211329..fd3d6ebffb 100644 --- a/src/test/java/org/kohsuke/github/GitHubConnectionTest.java +++ b/src/test/java/org/kohsuke/github/GitHubConnectionTest.java @@ -34,7 +34,8 @@ public GitHubConnectionTest() { /** * Test offline. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testOffline() throws Exception { @@ -53,7 +54,8 @@ public void testOffline() throws Exception { /** * Test git hub server with http. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubServerWithHttp() throws Exception { @@ -65,7 +67,8 @@ public void testGitHubServerWithHttp() throws Exception { /** * Test git hub server with https. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubServerWithHttps() throws Exception { @@ -77,7 +80,8 @@ public void testGitHubServerWithHttps() throws Exception { /** * Test git hub server without server. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubServerWithoutServer() throws Exception { @@ -89,7 +93,8 @@ public void testGitHubServerWithoutServer() throws Exception { /** * Test git hub builder from environment. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubBuilderFromEnvironment() throws IOException { @@ -138,7 +143,8 @@ public void testGitHubBuilderFromEnvironment() throws IOException { /** * Test git hub builder from custom environment. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubBuilderFromCustomEnvironment() throws IOException { @@ -180,7 +186,8 @@ public void testGitHubBuilderFromCustomEnvironment() throws IOException { /** * Test git hub builder from credentials with environment. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubBuilderFromCredentialsWithEnvironment() throws IOException { @@ -229,7 +236,8 @@ public void testGitHubBuilderFromCredentialsWithEnvironment() throws IOException /** * Test git hub builder from credentials with property file. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubBuilderFromCredentialsWithPropertyFile() throws IOException { @@ -313,7 +321,8 @@ private String getTestDirectory() { /** * Test anonymous. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testAnonymous() throws IOException { @@ -336,7 +345,8 @@ public void testAnonymous() throws IOException { /** * Test github builder with app installation token. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGithubBuilderWithAppInstallationToken() throws Exception { @@ -356,7 +366,8 @@ public void testGithubBuilderWithAppInstallationToken() throws Exception { /** * Test git hub is api url valid. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubIsApiUrlValid() throws IOException { @@ -389,7 +400,8 @@ public void testGitHubIsApiUrlValid() throws IOException { /** * Test git hub O auth user query. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGitHubOAuthUserQuery() throws IOException { diff --git a/src/test/java/org/kohsuke/github/GitHubStaticTest.java b/src/test/java/org/kohsuke/github/GitHubStaticTest.java index 37064fca20..16ac75b524 100644 --- a/src/test/java/org/kohsuke/github/GitHubStaticTest.java +++ b/src/test/java/org/kohsuke/github/GitHubStaticTest.java @@ -33,7 +33,8 @@ public class GitHubStaticTest extends AbstractGitHubWireMockTest { /** * Test parse URL. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testParseURL() throws Exception { @@ -51,7 +52,8 @@ public void testParseURL() throws Exception { /** * Test parse instant. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testParseInstant() throws Exception { @@ -61,7 +63,8 @@ public void testParseInstant() throws Exception { /** * Test raw url path invalid. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testRawUrlPathInvalid() throws Exception { @@ -76,7 +79,8 @@ public void testRawUrlPathInvalid() throws Exception { /** * Time round trip. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void timeRoundTrip() throws Exception { @@ -140,7 +144,8 @@ public void timeRoundTrip() throws Exception { /** * Test from record. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testFromRecord() throws Exception { @@ -201,7 +206,8 @@ public void testFromRecord() throws Exception { /** * Test git hub rate limit should replace rate limit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRateLimitShouldReplaceRateLimit() throws Exception { @@ -343,7 +349,8 @@ public void testGitHubRateLimitShouldReplaceRateLimit() throws Exception { /** * Test mapping reader writer. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testMappingReaderWriter() throws Exception { @@ -387,7 +394,8 @@ public void testMappingReaderWriter() throws Exception { /** * Test git hub request get api URL. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRequest_getApiURL() throws Exception { @@ -424,8 +432,10 @@ public void testGitHubRequest_getApiURL() throws Exception { /** * Format date. * - * @param dt the dt - * @param format the format + * @param dt + * the dt + * @param format + * the format * @return the string */ static String formatDate(Date dt, String format) { @@ -435,9 +445,12 @@ static String formatDate(Date dt, String format) { /** * Format zoned date. * - * @param dt the dt - * @param format the format - * @param timeZone the time zone + * @param dt + * the dt + * @param format + * the format + * @param timeZone + * the time zone * @return the string */ static String formatZonedDate(Date dt, String format, String timeZone) { diff --git a/src/test/java/org/kohsuke/github/GitHubTest.java b/src/test/java/org/kohsuke/github/GitHubTest.java index 524a520861..4b4a848545 100644 --- a/src/test/java/org/kohsuke/github/GitHubTest.java +++ b/src/test/java/org/kohsuke/github/GitHubTest.java @@ -20,7 +20,8 @@ public class GitHubTest extends AbstractGitHubWireMockTest { /** * List users. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void listUsers() throws IOException { @@ -33,8 +34,8 @@ public void listUsers() throws IOException { /** * Gets the repository. * - * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getRepository() throws IOException { @@ -63,8 +64,8 @@ public void getRepository() throws IOException { /** * Gets the orgs. * - * @return the orgs - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getOrgs() throws IOException { @@ -92,7 +93,8 @@ public void getOrgs() throws IOException { /** * Search users. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void searchUsers() throws Exception { @@ -106,7 +108,8 @@ public void searchUsers() throws Exception { /** * Test list all repositories. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testListAllRepositories() throws Exception { @@ -131,7 +134,8 @@ public void testListAllRepositories() throws Exception { /** * Search content. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void searchContent() throws Exception { @@ -251,7 +255,8 @@ public void searchContentWithForks() { /** * Test list my authorizations. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testListMyAuthorizations() throws IOException { @@ -265,8 +270,8 @@ public void testListMyAuthorizations() throws IOException { /** * Gets the meta. * - * @return the meta - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getMeta() throws IOException { @@ -304,8 +309,8 @@ public void getMeta() throws IOException { /** * Gets the my marketplace purchases. * - * @return the my marketplace purchases - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void getMyMarketplacePurchases() throws IOException { @@ -355,7 +360,8 @@ public void getMyMarketplacePurchases() throws IOException { /** * Gzip. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void gzip() throws Exception { @@ -373,7 +379,8 @@ public void gzip() throws Exception { /** * Test header field name. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHeaderFieldName() throws Exception { diff --git a/src/test/java/org/kohsuke/github/Github2faTest.java b/src/test/java/org/kohsuke/github/Github2faTest.java index e3e564f30f..a76661a8d0 100644 --- a/src/test/java/org/kohsuke/github/Github2faTest.java +++ b/src/test/java/org/kohsuke/github/Github2faTest.java @@ -19,7 +19,8 @@ public class Github2faTest extends AbstractGitHubWireMockTest { /** * Test 2 fa token. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void test2faToken() throws IOException { diff --git a/src/test/java/org/kohsuke/github/LifecycleTest.java b/src/test/java/org/kohsuke/github/LifecycleTest.java index 459ec6a031..2651346f78 100644 --- a/src/test/java/org/kohsuke/github/LifecycleTest.java +++ b/src/test/java/org/kohsuke/github/LifecycleTest.java @@ -17,11 +17,12 @@ * The Class LifecycleTest. */ public class LifecycleTest extends AbstractGitHubWireMockTest { - + /** * Test create repository. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testCreateRepository() throws IOException { diff --git a/src/test/java/org/kohsuke/github/OrgAppInstallationAuthorizationProviderTest.java b/src/test/java/org/kohsuke/github/OrgAppInstallationAuthorizationProviderTest.java index 64e4c3d95a..4b4549a6f5 100644 --- a/src/test/java/org/kohsuke/github/OrgAppInstallationAuthorizationProviderTest.java +++ b/src/test/java/org/kohsuke/github/OrgAppInstallationAuthorizationProviderTest.java @@ -25,7 +25,8 @@ public OrgAppInstallationAuthorizationProviderTest() { /** * Invalid JWT token raises exception. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test(expected = HttpException.class) public void invalidJWTTokenRaisesException() throws IOException { @@ -42,7 +43,8 @@ public void invalidJWTTokenRaisesException() throws IOException { /** * Valid JWT token allows oauth token request. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void validJWTTokenAllowsOauthTokenRequest() throws IOException { diff --git a/src/test/java/org/kohsuke/github/Payload.java b/src/test/java/org/kohsuke/github/Payload.java index 467e63ae47..74754b17a6 100644 --- a/src/test/java/org/kohsuke/github/Payload.java +++ b/src/test/java/org/kohsuke/github/Payload.java @@ -12,7 +12,7 @@ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Payload { - + /** * Value. * diff --git a/src/test/java/org/kohsuke/github/PayloadRule.java b/src/test/java/org/kohsuke/github/PayloadRule.java index 4eb4c382eb..dcd41cae0f 100644 --- a/src/test/java/org/kohsuke/github/PayloadRule.java +++ b/src/test/java/org/kohsuke/github/PayloadRule.java @@ -33,7 +33,8 @@ public class PayloadRule implements TestRule { /** * Instantiates a new payload rule. * - * @param type the type + * @param type + * the type */ public PayloadRule(String type) { this.type = type; @@ -42,8 +43,10 @@ public PayloadRule(String type) { /** * Apply. * - * @param base the base - * @param description the description + * @param base + * the base + * @param description + * the description * @return the statement */ public Statement apply(final Statement base, final Description description) { @@ -66,7 +69,8 @@ public void evaluate() throws Throwable { * As input stream. * * @return the input stream - * @throws FileNotFoundException the file not found exception + * @throws FileNotFoundException + * the file not found exception */ public InputStream asInputStream() throws FileNotFoundException { String name = resourceName.startsWith("/") @@ -83,7 +87,8 @@ public InputStream asInputStream() throws FileNotFoundException { * As bytes. * * @return the byte[] - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public byte[] asBytes() throws IOException { InputStream input = asInputStream(); @@ -97,9 +102,11 @@ public byte[] asBytes() throws IOException { /** * As string. * - * @param encoding the encoding + * @param encoding + * the encoding * @return the string - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public String asString(Charset encoding) throws IOException { return new String(asBytes(), encoding.name()); @@ -108,9 +115,11 @@ public String asString(Charset encoding) throws IOException { /** * As string. * - * @param encoding the encoding + * @param encoding + * the encoding * @return the string - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public String asString(String encoding) throws IOException { return new String(asBytes(), encoding); @@ -120,7 +129,8 @@ public String asString(String encoding) throws IOException { * As string. * * @return the string - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public String asString() throws IOException { return new String(asBytes(), Charset.defaultCharset().name()); @@ -130,7 +140,8 @@ public String asString() throws IOException { * As reader. * * @return the reader - * @throws FileNotFoundException the file not found exception + * @throws FileNotFoundException + * the file not found exception */ public Reader asReader() throws FileNotFoundException { return new InputStreamReader(asInputStream(), Charset.defaultCharset()); @@ -139,9 +150,11 @@ public Reader asReader() throws FileNotFoundException { /** * As reader. * - * @param transformer the transformer + * @param transformer + * the transformer * @return the reader - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public Reader asReader(@Nonnull Function transformer) throws IOException { String payloadString = asString(); @@ -151,9 +164,11 @@ public Reader asReader(@Nonnull Function transformer) throws IOE /** * As reader. * - * @param encoding the encoding + * @param encoding + * the encoding * @return the reader - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public Reader asReader(String encoding) throws IOException { return new InputStreamReader(asInputStream(), encoding); @@ -162,9 +177,11 @@ public Reader asReader(String encoding) throws IOException { /** * As reader. * - * @param encoding the encoding + * @param encoding + * the encoding * @return the reader - * @throws FileNotFoundException the file not found exception + * @throws FileNotFoundException + * the file not found exception */ public Reader asReader(Charset encoding) throws FileNotFoundException { return new InputStreamReader(asInputStream(), encoding); diff --git a/src/test/java/org/kohsuke/github/RateLimitCheckerTest.java b/src/test/java/org/kohsuke/github/RateLimitCheckerTest.java index 2822d47d24..8192ce0359 100644 --- a/src/test/java/org/kohsuke/github/RateLimitCheckerTest.java +++ b/src/test/java/org/kohsuke/github/RateLimitCheckerTest.java @@ -19,7 +19,7 @@ public class RateLimitCheckerTest extends AbstractGitHubWireMockTest { /** The rate limit. */ GHRateLimit rateLimit = null; - + /** The previous limit. */ GHRateLimit previousLimit = null; @@ -43,7 +43,8 @@ protected WireMockConfiguration getWireMockOptions() { /** * Test git hub rate limit. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testGitHubRateLimit() throws Exception { diff --git a/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java b/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java index 19de3d08fe..b624409152 100644 --- a/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java +++ b/src/test/java/org/kohsuke/github/RateLimitHandlerTest.java @@ -52,7 +52,8 @@ protected WireMockConfiguration getWireMockOptions() { /** * Test handler fail. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_Fail() throws Exception { @@ -81,7 +82,8 @@ public void testHandler_Fail() throws Exception { /** * Test handler http status fail. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_HttpStatus_Fail() throws Exception { @@ -113,7 +115,8 @@ public void testHandler_HttpStatus_Fail() throws Exception { /** * Test handler wait. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_Wait() throws Exception { @@ -134,7 +137,8 @@ public void testHandler_Wait() throws Exception { /** * Test handler wait stuck. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testHandler_WaitStuck() throws Exception { diff --git a/src/test/java/org/kohsuke/github/RepositoryTrafficTest.java b/src/test/java/org/kohsuke/github/RepositoryTrafficTest.java index b39333c37e..416c510710 100644 --- a/src/test/java/org/kohsuke/github/RepositoryTrafficTest.java +++ b/src/test/java/org/kohsuke/github/RepositoryTrafficTest.java @@ -46,7 +46,8 @@ private static GHRepository getRepository(GitHub gitHub) throws IOException { /** * Test get views. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetViews() throws IOException { @@ -78,7 +79,8 @@ public void testGetViews() throws IOException { /** * Test get clones. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetClones() throws IOException { @@ -108,7 +110,8 @@ public void testGetClones() throws IOException { /** * Test get traffic stats access failure due to insufficient permissions. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Test public void testGetTrafficStatsAccessFailureDueToInsufficientPermissions() throws IOException { diff --git a/src/test/java/org/kohsuke/github/RequesterRetryTest.java b/src/test/java/org/kohsuke/github/RequesterRetryTest.java index 1998cdfb97..5a635c3a0f 100644 --- a/src/test/java/org/kohsuke/github/RequesterRetryTest.java +++ b/src/test/java/org/kohsuke/github/RequesterRetryTest.java @@ -49,10 +49,10 @@ public class RequesterRetryTest extends AbstractGitHubWireMockTest { // class private static OutputStream logCapturingStream; private static StreamHandler customLogHandler; - + /** The connection. */ HttpURLConnection connection; - + /** The base request count. */ int baseRequestCount; @@ -67,7 +67,8 @@ public RequesterRetryTest() { * Gets the repository. * * @return the repository - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ protected GHRepository getRepository() throws IOException { return getRepository(gitHub); @@ -92,7 +93,8 @@ public void attachLogCapturer() { * Gets the test captured log. * * @return the test captured log - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public String getTestCapturedLog() throws IOException { customLogHandler.flush(); @@ -102,7 +104,8 @@ public String getTestCapturedLog() throws IOException { /** * Reset test captured log. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public void resetTestCapturedLog() throws IOException { Logger.getLogger(GitHubClient.class.getName()).removeHandler(customLogHandler); @@ -114,7 +117,8 @@ public void resetTestCapturedLog() throws IOException { /** * Test git hub is api url valid. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Used okhttp3 and this to verify connection closing. Too flaky for CI system.") @Test @@ -147,7 +151,8 @@ public void testGitHubIsApiUrlValid() throws Exception { /** * Test socket connection and retry. * - * @throws Exception the exception + * @throws Exception + * the exception */ // Issue #539 @Test @@ -182,7 +187,8 @@ public void testSocketConnectionAndRetry() throws Exception { /** * Test socket connection and retry status code. * - * @throws Exception the exception + * @throws Exception + * the exception */ // Issue #539 @Test @@ -219,7 +225,8 @@ public void testSocketConnectionAndRetry_StatusCode() throws Exception { /** * Test socket connection and retry success. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testSocketConnectionAndRetry_Success() throws Exception { @@ -277,7 +284,8 @@ public void testSocketConnectionAndRetry_Success() throws Exception { /** * Test response code failure exceptions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testResponseCodeFailureExceptions() throws Exception { @@ -329,7 +337,8 @@ public void testResponseCodeFailureExceptions() throws Exception { /** * Test input stream failure exceptions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testInputStreamFailureExceptions() throws Exception { @@ -393,7 +402,8 @@ public void testInputStreamFailureExceptions() throws Exception { /** * Test response code connection exceptions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testResponseCodeConnectionExceptions() throws Exception { @@ -420,7 +430,8 @@ public void testResponseCodeConnectionExceptions() throws Exception { /** * Test input stream connection exceptions. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void testInputStreamConnectionExceptions() throws Exception { @@ -495,14 +506,16 @@ private void runConnectionExceptionStatusCodeTest(HttpConnector connector, int e /** * The Class ResponseCodeThrowingHttpConnector. * - * @param the element type + * @param + * the element type */ class ResponseCodeThrowingHttpConnector extends ImpatientHttpConnector { /** * Instantiates a new response code throwing http connector. * - * @param thrower the thrower + * @param thrower + * the thrower */ ResponseCodeThrowingHttpConnector(final Thrower thrower) { super(new HttpConnector() { @@ -537,14 +550,16 @@ public int getResponseCode() throws IOException { /** * The Class InputStreamThrowingHttpConnector. * - * @param the element type + * @param + * the element type */ class InputStreamThrowingHttpConnector extends ImpatientHttpConnector { /** * Instantiates a new input stream throwing http connector. * - * @param thrower the thrower + * @param thrower + * the thrower */ InputStreamThrowingHttpConnector(final Thrower thrower) { super(new HttpConnector() { @@ -579,15 +594,17 @@ public InputStream getInputStream() throws IOException { /** * The Interface Thrower. * - * @param the element type + * @param + * the element type */ @FunctionalInterface public interface Thrower { - + /** * Throw error. * - * @throws E the e + * @throws E + * the e */ void throwError() throws E; } @@ -604,8 +621,10 @@ static class HttpURLConnectionWrapper extends HttpURLConnection { /** * Instantiates a new http URL connection wrapper. * - * @param url the url - * @throws IOException Signals that an I/O exception has occurred. + * @param url + * the url + * @throws IOException + * Signals that an I/O exception has occurred. */ HttpURLConnectionWrapper(URL url) throws IOException { super(new URL("http://nonexistant")); @@ -615,7 +634,8 @@ static class HttpURLConnectionWrapper extends HttpURLConnection { /** * Connect. * - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public void connect() throws IOException { httpURLConnection.connect(); @@ -624,7 +644,8 @@ public void connect() throws IOException { /** * Sets the connect timeout. * - * @param timeout the new connect timeout + * @param timeout + * the new connect timeout */ public void setConnectTimeout(int timeout) { httpURLConnection.setConnectTimeout(timeout); @@ -642,7 +663,8 @@ public int getConnectTimeout() { /** * Sets the read timeout. * - * @param timeout the new read timeout + * @param timeout + * the new read timeout */ public void setReadTimeout(int timeout) { httpURLConnection.setReadTimeout(timeout); @@ -732,7 +754,8 @@ public long getLastModified() { /** * Gets the header field. * - * @param name the name + * @param name + * the name * @return the header field */ public String getHeaderField(String name) { @@ -751,8 +774,10 @@ public Map> getHeaderFields() { /** * Gets the header field int. * - * @param name the name - * @param Default the default + * @param name + * the name + * @param Default + * the default * @return the header field int */ public int getHeaderFieldInt(String name, int Default) { @@ -762,8 +787,10 @@ public int getHeaderFieldInt(String name, int Default) { /** * Gets the header field long. * - * @param name the name - * @param Default the default + * @param name + * the name + * @param Default + * the default * @return the header field long */ public long getHeaderFieldLong(String name, long Default) { @@ -774,7 +801,8 @@ public long getHeaderFieldLong(String name, long Default) { * Gets the content. * * @return the content - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public Object getContent() throws IOException { return httpURLConnection.getContent(); @@ -783,9 +811,11 @@ public Object getContent() throws IOException { /** * Gets the content. * - * @param classes the classes + * @param classes + * the classes * @return the content - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ @Override public Object getContent(Class[] classes) throws IOException { @@ -796,7 +826,8 @@ public Object getContent(Class[] classes) throws IOException { * Gets the input stream. * * @return the input stream - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public InputStream getInputStream() throws IOException { return httpURLConnection.getInputStream(); @@ -806,7 +837,8 @@ public InputStream getInputStream() throws IOException { * Gets the output stream. * * @return the output stream - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public OutputStream getOutputStream() throws IOException { return httpURLConnection.getOutputStream(); @@ -824,7 +856,8 @@ public String toString() { /** * Sets the do input. * - * @param doinput the new do input + * @param doinput + * the new do input */ public void setDoInput(boolean doinput) { httpURLConnection.setDoInput(doinput); @@ -842,7 +875,8 @@ public boolean getDoInput() { /** * Sets the do output. * - * @param dooutput the new do output + * @param dooutput + * the new do output */ public void setDoOutput(boolean dooutput) { httpURLConnection.setDoOutput(dooutput); @@ -860,7 +894,8 @@ public boolean getDoOutput() { /** * Sets the allow user interaction. * - * @param allowuserinteraction the new allow user interaction + * @param allowuserinteraction + * the new allow user interaction */ public void setAllowUserInteraction(boolean allowuserinteraction) { httpURLConnection.setAllowUserInteraction(allowuserinteraction); @@ -878,7 +913,8 @@ public boolean getAllowUserInteraction() { /** * Sets the use caches. * - * @param usecaches the new use caches + * @param usecaches + * the new use caches */ public void setUseCaches(boolean usecaches) { httpURLConnection.setUseCaches(usecaches); @@ -896,7 +932,8 @@ public boolean getUseCaches() { /** * Sets the if modified since. * - * @param ifmodifiedsince the new if modified since + * @param ifmodifiedsince + * the new if modified since */ public void setIfModifiedSince(long ifmodifiedsince) { httpURLConnection.setIfModifiedSince(ifmodifiedsince); @@ -923,7 +960,8 @@ public boolean getDefaultUseCaches() { /** * Sets the default use caches. * - * @param defaultusecaches the new default use caches + * @param defaultusecaches + * the new default use caches */ public void setDefaultUseCaches(boolean defaultusecaches) { httpURLConnection.setDefaultUseCaches(defaultusecaches); @@ -932,8 +970,10 @@ public void setDefaultUseCaches(boolean defaultusecaches) { /** * Sets the request property. * - * @param key the key - * @param value the value + * @param key + * the key + * @param value + * the value */ public void setRequestProperty(String key, String value) { httpURLConnection.setRequestProperty(key, value); @@ -942,8 +982,10 @@ public void setRequestProperty(String key, String value) { /** * Adds the request property. * - * @param key the key - * @param value the value + * @param key + * the key + * @param value + * the value */ public void addRequestProperty(String key, String value) { httpURLConnection.addRequestProperty(key, value); @@ -952,7 +994,8 @@ public void addRequestProperty(String key, String value) { /** * Gets the request property. * - * @param key the key + * @param key + * the key * @return the request property */ public String getRequestProperty(String key) { @@ -971,7 +1014,8 @@ public Map> getRequestProperties() { /** * Gets the header field key. * - * @param n the n + * @param n + * the n * @return the header field key */ public String getHeaderFieldKey(int n) { @@ -981,7 +1025,8 @@ public String getHeaderFieldKey(int n) { /** * Sets the fixed length streaming mode. * - * @param contentLength the new fixed length streaming mode + * @param contentLength + * the new fixed length streaming mode */ public void setFixedLengthStreamingMode(int contentLength) { httpURLConnection.setFixedLengthStreamingMode(contentLength); @@ -990,7 +1035,8 @@ public void setFixedLengthStreamingMode(int contentLength) { /** * Sets the fixed length streaming mode. * - * @param contentLength the new fixed length streaming mode + * @param contentLength + * the new fixed length streaming mode */ public void setFixedLengthStreamingMode(long contentLength) { httpURLConnection.setFixedLengthStreamingMode(contentLength); @@ -999,7 +1045,8 @@ public void setFixedLengthStreamingMode(long contentLength) { /** * Sets the chunked streaming mode. * - * @param chunklen the new chunked streaming mode + * @param chunklen + * the new chunked streaming mode */ public void setChunkedStreamingMode(int chunklen) { httpURLConnection.setChunkedStreamingMode(chunklen); @@ -1008,7 +1055,8 @@ public void setChunkedStreamingMode(int chunklen) { /** * Gets the header field. * - * @param n the n + * @param n + * the n * @return the header field */ public String getHeaderField(int n) { @@ -1018,7 +1066,8 @@ public String getHeaderField(int n) { /** * Sets the instance follow redirects. * - * @param followRedirects the new instance follow redirects + * @param followRedirects + * the new instance follow redirects */ public void setInstanceFollowRedirects(boolean followRedirects) { httpURLConnection.setInstanceFollowRedirects(followRedirects); @@ -1036,8 +1085,10 @@ public boolean getInstanceFollowRedirects() { /** * Sets the request method. * - * @param method the new request method - * @throws ProtocolException the protocol exception + * @param method + * the new request method + * @throws ProtocolException + * the protocol exception */ public void setRequestMethod(String method) throws ProtocolException { httpURLConnection.setRequestMethod(method); @@ -1056,7 +1107,8 @@ public String getRequestMethod() { * Gets the response code. * * @return the response code - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public int getResponseCode() throws IOException { return httpURLConnection.getResponseCode(); @@ -1066,7 +1118,8 @@ public int getResponseCode() throws IOException { * Gets the response message. * * @return the response message - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public String getResponseMessage() throws IOException { return httpURLConnection.getResponseMessage(); @@ -1075,8 +1128,10 @@ public String getResponseMessage() throws IOException { /** * Gets the header field date. * - * @param name the name - * @param Default the default + * @param name + * the name + * @param Default + * the default * @return the header field date */ public long getHeaderFieldDate(String name, long Default) { @@ -1103,7 +1158,8 @@ public boolean usingProxy() { * Gets the permission. * * @return the permission - * @throws IOException Signals that an I/O exception has occurred. + * @throws IOException + * Signals that an I/O exception has occurred. */ public Permission getPermission() throws IOException { return httpURLConnection.getPermission(); diff --git a/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java b/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java index 376456c2ea..f2033f5ae2 100644 --- a/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java +++ b/src/test/java/org/kohsuke/github/WireMockStatusReporterTest.java @@ -22,7 +22,8 @@ public class WireMockStatusReporterTest extends AbstractGitHubWireMockTest { /** * User when proxying auth correctly configured. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void user_whenProxying_AuthCorrectlyConfigured() throws Exception { @@ -49,7 +50,8 @@ public void user_whenProxying_AuthCorrectlyConfigured() throws Exception { /** * User when not proxying stubbed. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void user_whenNotProxying_Stubbed() throws Exception { @@ -72,7 +74,8 @@ public void user_whenNotProxying_Stubbed() throws Exception { /** * Basic behaviors when not proxying. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Can't run this as WireMock will report failure after the test method completes.") @Test @@ -114,7 +117,8 @@ public void BasicBehaviors_whenNotProxying() throws Exception { /** * Basic behaviors when proxying. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void BasicBehaviors_whenProxying() throws Exception { @@ -149,7 +153,8 @@ public void BasicBehaviors_whenProxying() throws Exception { /** * When snapshot ensure proxy. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Test public void whenSnapshot_EnsureProxy() throws Exception { @@ -162,7 +167,8 @@ public void whenSnapshot_EnsureProxy() throws Exception { /** * When snapshot ensure record to expected location. * - * @throws Exception the exception + * @throws Exception + * the exception */ @Ignore("Not implemented yet") @Test diff --git a/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java b/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java index 2e03775f69..2ed356555a 100644 --- a/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java +++ b/src/test/java/org/kohsuke/github/extras/GitHubCachingTest.java @@ -22,6 +22,7 @@ import static org.junit.Assert.fail; +// TODO: Auto-generated Javadoc /** * Test showing the behavior of OkHttpGitHubConnector cache with GitHub 404 responses. * @@ -29,17 +30,32 @@ */ public class GitHubCachingTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new git hub caching test. + */ public GitHubCachingTest() { useDefaultGitHub = false; } + /** The test ref name. */ String testRefName = "heads/test/content_ref_cache"; + /** + * Gets the wire mock options. + * + * @return the wire mock options + */ @Override protected WireMockConfiguration getWireMockOptions() { return super.getWireMockOptions().extensions(templating.newResponseTransformer()); } + /** + * Setup repo. + * + * @throws Exception + * the exception + */ @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { @@ -54,6 +70,12 @@ public void setupRepo() throws Exception { } } + /** + * Test cached 404. + * + * @throws Exception + * the exception + */ @Test public void testCached404() throws Exception { Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); diff --git a/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java b/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java index 761cf32b55..454c2fb032 100644 --- a/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/OkHttpConnectorTest.java @@ -19,6 +19,7 @@ import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; +// TODO: Auto-generated Javadoc /** * Test showing the behavior of OkHttpGitHubConnector with and without cache. *

@@ -41,6 +42,9 @@ */ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new ok http connector test. + */ public OkHttpConnectorTest() { useDefaultGitHub = false; } @@ -65,11 +69,22 @@ public OkHttpConnectorTest() { private GHRateLimit rateLimitBefore; + /** + * Gets the wire mock options. + * + * @return the wire mock options + */ @Override protected WireMockConfiguration getWireMockOptions() { return super.getWireMockOptions().extensions(templating.newResponseTransformer()); } + /** + * Setup repo. + * + * @throws Exception + * the exception + */ @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { @@ -82,6 +97,12 @@ public void setupRepo() throws Exception { } } + /** + * Default connector. + * + * @throws Exception + * the exception + */ @Test public void DefaultConnector() throws Exception { @@ -96,6 +117,12 @@ public void DefaultConnector() throws Exception { checkRequestAndLimit(defaultNetworkRequestCount, defaultRateLimitUsed); } + /** + * Ok http connector no cache. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_NoCache() throws Exception { @@ -118,6 +145,12 @@ public void OkHttpConnector_NoCache() throws Exception { assertThat("Cache", cache, is(nullValue())); } + /** + * Ok http connector cache max age none. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { // The responses were recorded from github, but the Date headers @@ -148,6 +181,12 @@ public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { assertThat("getHitCount", cache.getHitCount(), is(maxAgeNoneHitCount)); } + /** + * Ok http connector cache max age three. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { @@ -174,6 +213,12 @@ public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { assertThat("getHitCount", cache.getHitCount(), is(maxAgeThreeHitCount)); } + /** + * Ok http connector cache max age default zero. + * + * @throws Exception + * the exception + */ @Ignore("ISSUE #597 - Correctly formatted Last-Modified headers cause this test to fail") @Test public void OkHttpConnector_Cache_MaxAgeDefault_Zero() throws Exception { diff --git a/src/test/java/org/kohsuke/github/extras/authorization/JWTTokenProviderTest.java b/src/test/java/org/kohsuke/github/extras/authorization/JWTTokenProviderTest.java index 24581000ed..793da64bce 100644 --- a/src/test/java/org/kohsuke/github/extras/authorization/JWTTokenProviderTest.java +++ b/src/test/java/org/kohsuke/github/extras/authorization/JWTTokenProviderTest.java @@ -11,30 +11,36 @@ import static org.hamcrest.Matchers.*; +// TODO: Auto-generated Javadoc +/** + * The Class JWTTokenProviderTest. + */ /* - * This test will request an application ensuring that the header for the "Authorization" matches a valid JWT token. - * A JWT token in the Authorization header will always start with "ey" which is always the start of the base64 - * encoding of the JWT Header , so a valid header will look like this: + * This test will request an application ensuring that the header for the "Authorization" matches a valid JWT token. A + * JWT token in the Authorization header will always start with "ey" which is always the start of the base64 encoding of + * the JWT Header , so a valid header will look like this: * - *

- * Authorization: Bearer ey{rest of the header}.{payload}.{signature}
- * 
+ *
 Authorization: Bearer ey{rest of the header}.{payload}.{signature} 
* * Matched by the regular expression: * - *
- * ^Bearer (?ey\S*)\.(?\S*)\.(?\S*)$
- * 
+ *
 ^Bearer (?ey\S*)\.(?\S*)\.(?\S*)$ 
* - * Which is present in the wiremock matcher. Note that we need to use a matcher because the JWT token is encoded - * with a private key and a random nonce, so it will never be the same (under normal conditions). For more - * information on the format of a JWT token, see: https://jwt.io/introduction/ + * Which is present in the wiremock matcher. Note that we need to use a matcher because the JWT token is encoded with a + * private key and a random nonce, so it will never be the same (under normal conditions). For more information on the + * format of a JWT token, see: https://jwt.io/introduction/ */ public class JWTTokenProviderTest extends AbstractGHAppInstallationTest { private static String TEST_APP_ID_2 = "83009"; private static String PRIVATE_KEY_FILE_APP_2 = "/ghapi-test-app-2.private-key.pem"; + /** + * Test caching valid authorization. + * + * @throws IOException + * Signals that an I/O exception has occurred. + */ @Test public void testCachingValidAuthorization() throws IOException { assertThat(jwtProvider1, instanceOf(JWTTokenProvider.class)); @@ -47,6 +53,14 @@ public void testCachingValidAuthorization() throws IOException { assertThat(authorizationRefresh, sameInstance(authorization)); } + /** + * Test authorization header pattern. + * + * @throws GeneralSecurityException + * the general security exception + * @throws IOException + * Signals that an I/O exception has occurred. + */ @Test public void testAuthorizationHeaderPattern() throws GeneralSecurityException, IOException { // authorization header check is custom @@ -63,6 +77,14 @@ public void testAuthorizationHeaderPattern() throws GeneralSecurityException, IO gh.getApp(); } + /** + * Test issued at skew. + * + * @throws GeneralSecurityException + * the general security exception + * @throws IOException + * Signals that an I/O exception has occurred. + */ @Test public void testIssuedAtSkew() throws GeneralSecurityException, IOException { // TODO: This isn't a great test as it doesn't really check anything in CI diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java index 00abeaad20..9694f25eb8 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/GitHubCachingTest.java @@ -21,6 +21,7 @@ import static org.junit.Assert.fail; +// TODO: Auto-generated Javadoc /** * Test showing the behavior of OkHttpGitHubConnector cache with GitHub 404 responses. * @@ -28,12 +29,21 @@ */ public class GitHubCachingTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new git hub caching test. + */ public GitHubCachingTest() { useDefaultGitHub = false; } + /** The test ref name. */ String testRefName = "heads/test/content_ref_cache"; + /** + * Gets the wire mock options. + * + * @return the wire mock options + */ @Override protected WireMockConfiguration getWireMockOptions() { return super.getWireMockOptions() @@ -42,6 +52,12 @@ protected WireMockConfiguration getWireMockOptions() { .extensions(templating.newResponseTransformer()); } + /** + * Setup repo. + * + * @throws Exception + * the exception + */ @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { @@ -56,6 +72,12 @@ public void setupRepo() throws Exception { } } + /** + * Test cached 404. + * + * @throws Exception + * the exception + */ @Test public void testCached404() throws Exception { Assume.assumeFalse(SystemUtils.IS_OS_WINDOWS); diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java index 792c199442..470147f2e1 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpConnectorTest.java @@ -23,6 +23,7 @@ import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; +// TODO: Auto-generated Javadoc /** * Test showing the behavior of OkHttpConnector with and without cache. *

@@ -45,6 +46,9 @@ */ public class OkHttpConnectorTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new ok http connector test. + */ public OkHttpConnectorTest() { useDefaultGitHub = false; } @@ -70,6 +74,11 @@ public OkHttpConnectorTest() { private GHRateLimit rateLimitBefore; private Cache cache = null; + /** + * Gets the wire mock options. + * + * @return the wire mock options + */ @Override protected WireMockConfiguration getWireMockOptions() { return super.getWireMockOptions() @@ -78,6 +87,12 @@ protected WireMockConfiguration getWireMockOptions() { .extensions(templating.newResponseTransformer()); } + /** + * Setup repo. + * + * @throws Exception + * the exception + */ @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { @@ -90,6 +105,12 @@ public void setupRepo() throws Exception { } } + /** + * Delete cache. + * + * @throws IOException + * Signals that an I/O exception has occurred. + */ @After public void deleteCache() throws IOException { if (cache != null) { @@ -97,6 +118,12 @@ public void deleteCache() throws IOException { } } + /** + * Default connector. + * + * @throws Exception + * the exception + */ @Test public void DefaultConnector() throws Exception { @@ -111,6 +138,12 @@ public void DefaultConnector() throws Exception { checkRequestAndLimit(defaultNetworkRequestCount, defaultRateLimitUsed); } + /** + * Ok http connector no cache. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_NoCache() throws Exception { @@ -132,6 +165,12 @@ public void OkHttpConnector_NoCache() throws Exception { assertThat("Cache", cache, is(nullValue())); } + /** + * Ok http connector cache max age none. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { // The responses were recorded from github, but the Date headers @@ -160,6 +199,12 @@ public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { assertThat("getHitCount", cache.hitCount(), is(maxAgeNoneHitCount)); } + /** + * Ok http connector cache max age three. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { @@ -185,6 +230,12 @@ public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { assertThat("getHitCount", cache.hitCount(), is(maxAgeThreeHitCount)); } + /** + * Ok http connector cache max age default zero. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAgeDefault_Zero() throws Exception { // The responses were recorded from github, but the Date headers diff --git a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnectorTest.java b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnectorTest.java index 773b3f8614..678e001796 100644 --- a/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnectorTest.java +++ b/src/test/java/org/kohsuke/github/extras/okhttp3/OkHttpGitHubConnectorTest.java @@ -22,6 +22,7 @@ import static org.junit.Assume.assumeFalse; import static org.junit.Assume.assumeTrue; +// TODO: Auto-generated Javadoc /** * Test showing the behavior of OkHttpGitHubConnector with and without cache. *

@@ -44,6 +45,9 @@ */ public class OkHttpGitHubConnectorTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new ok http git hub connector test. + */ public OkHttpGitHubConnectorTest() { useDefaultGitHub = false; } @@ -69,6 +73,11 @@ public OkHttpGitHubConnectorTest() { private GHRateLimit rateLimitBefore; private Cache cache = null; + /** + * Gets the wire mock options. + * + * @return the wire mock options + */ @Override protected WireMockConfiguration getWireMockOptions() { return super.getWireMockOptions() @@ -77,6 +86,12 @@ protected WireMockConfiguration getWireMockOptions() { .extensions(templating.newResponseTransformer()); } + /** + * Setup repo. + * + * @throws Exception + * the exception + */ @Before public void setupRepo() throws Exception { if (mockGitHub.isUseProxy()) { @@ -89,6 +104,12 @@ public void setupRepo() throws Exception { } } + /** + * Delete cache. + * + * @throws IOException + * Signals that an I/O exception has occurred. + */ @After public void deleteCache() throws IOException { if (cache != null) { @@ -96,6 +117,12 @@ public void deleteCache() throws IOException { } } + /** + * Default connector. + * + * @throws Exception + * the exception + */ @Test public void DefaultConnector() throws Exception { @@ -110,6 +137,12 @@ public void DefaultConnector() throws Exception { checkRequestAndLimit(defaultNetworkRequestCount, defaultRateLimitUsed); } + /** + * Ok http connector no cache. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_NoCache() throws Exception { @@ -131,6 +164,12 @@ public void OkHttpConnector_NoCache() throws Exception { assertThat("Cache", cache, is(nullValue())); } + /** + * Ok http connector cache max age none. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { // The responses were recorded from github, but the Date headers @@ -159,6 +198,12 @@ public void OkHttpConnector_Cache_MaxAgeNone() throws Exception { assertThat("getHitCount", cache.hitCount(), is(maxAgeNoneHitCount)); } + /** + * Ok http connector cache max age three. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { @@ -184,6 +229,12 @@ public void OkHttpConnector_Cache_MaxAge_Three() throws Exception { assertThat("getHitCount", cache.hitCount(), is(maxAgeThreeHitCount)); } + /** + * Ok http connector cache max age default zero. + * + * @throws Exception + * the exception + */ @Test public void OkHttpConnector_Cache_MaxAgeDefault_Zero() throws Exception { // The responses were recorded from github, but the Date headers diff --git a/src/test/java/org/kohsuke/github/internal/DefaultGitHubConnectorTest.java b/src/test/java/org/kohsuke/github/internal/DefaultGitHubConnectorTest.java index e7f66b1ff1..997298debb 100644 --- a/src/test/java/org/kohsuke/github/internal/DefaultGitHubConnectorTest.java +++ b/src/test/java/org/kohsuke/github/internal/DefaultGitHubConnectorTest.java @@ -15,12 +15,25 @@ import static org.hamcrest.CoreMatchers.*; +// TODO: Auto-generated Javadoc +/** + * The Class DefaultGitHubConnectorTest. + */ public class DefaultGitHubConnectorTest extends AbstractGitHubWireMockTest { + /** + * Instantiates a new default git hub connector test. + */ public DefaultGitHubConnectorTest() { useDefaultGitHub = false; } + /** + * Test create. + * + * @throws Exception + * the exception + */ @Test public void testCreate() throws Exception { GitHubConnector connector; diff --git a/src/test/java/org/kohsuke/github/internal/EnumUtilsTest.java b/src/test/java/org/kohsuke/github/internal/EnumUtilsTest.java index 0eb47385e0..b7bab96ec9 100644 --- a/src/test/java/org/kohsuke/github/internal/EnumUtilsTest.java +++ b/src/test/java/org/kohsuke/github/internal/EnumUtilsTest.java @@ -5,8 +5,15 @@ import static org.hamcrest.MatcherAssert.assertThat; import static org.hamcrest.Matchers.*; +// TODO: Auto-generated Javadoc +/** + * The Class EnumUtilsTest. + */ public class EnumUtilsTest { + /** + * Test get enum. + */ @Test public void testGetEnum() { assertThat(EnumUtils.getEnumOrDefault(TestEnum.class, null, TestEnum.UNKNOWN), equalTo(TestEnum.UNKNOWN)); diff --git a/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java b/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java index 38c7c5f3c3..bc513687fd 100644 --- a/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java +++ b/src/test/java/org/kohsuke/github/junit/GitHubWireMockRule.java @@ -26,6 +26,7 @@ import static com.github.tomakehurst.wiremock.client.WireMock.*; import static com.github.tomakehurst.wiremock.common.Gzip.unGzipToString; +// TODO: Auto-generated Javadoc /** * The standard WireMockRule eagerly initializes a WireMockServer. This version suptakes a laze approach allowing us to * automatically isolate snapshots for each method. @@ -43,56 +44,122 @@ public class GitHubWireMockRule extends WireMockMultiServerRule { private final static boolean useProxy = takeSnapshot || System.getProperty("test.github.useProxy", "false") != "false"; + /** + * Customize record spec. + * + * @param customizeRecordSpec + * the customize record spec + */ public void customizeRecordSpec(Consumer customizeRecordSpec) { this.customizeRecordSpec = customizeRecordSpec; } private Consumer customizeRecordSpec = null; + /** + * Instantiates a new git hub wire mock rule. + */ public GitHubWireMockRule() { this(WireMockConfiguration.options()); } + /** + * Instantiates a new git hub wire mock rule. + * + * @param options + * the options + */ public GitHubWireMockRule(WireMockConfiguration options) { this(options, true); } + /** + * Instantiates a new git hub wire mock rule. + * + * @param options + * the options + * @param failOnUnmatchedRequests + * the fail on unmatched requests + */ public GitHubWireMockRule(WireMockConfiguration options, boolean failOnUnmatchedRequests) { super(options, failOnUnmatchedRequests); } + /** + * Api server. + * + * @return the wire mock server + */ public WireMockServer apiServer() { return servers.get("default"); } + /** + * Raw server. + * + * @return the wire mock server + */ public WireMockServer rawServer() { return servers.get("raw"); } + /** + * Uploads server. + * + * @return the wire mock server + */ public WireMockServer uploadsServer() { return servers.get("uploads"); } + /** + * Codeload server. + * + * @return the wire mock server + */ public WireMockServer codeloadServer() { return servers.get("codeload"); } + /** + * Actions user content server. + * + * @return the wire mock server + */ public WireMockServer actionsUserContentServer() { return servers.get("actions-user-content"); } + /** + * Checks if is use proxy. + * + * @return true, if is use proxy + */ public boolean isUseProxy() { return GitHubWireMockRule.useProxy; } + /** + * Checks if is take snapshot. + * + * @return true, if is take snapshot + */ public boolean isTakeSnapshot() { return GitHubWireMockRule.takeSnapshot; } + /** + * Checks if is test with org. + * + * @return true, if is test with org + */ public boolean isTestWithOrg() { return GitHubWireMockRule.testWithOrg; } + /** + * Initialize servers. + */ @Override protected void initializeServers() { super.initializeServers(); @@ -116,6 +183,9 @@ protected void initializeServers() { } } + /** + * Before. + */ @Override protected void before() { super.before(); @@ -144,6 +214,9 @@ protected void before() { } + /** + * After. + */ @Override protected void after() { super.after(); @@ -191,10 +264,22 @@ private void recordSnapshot(WireMockServer server, String target, boolean isRawS } } + /** + * Gets the request count. + * + * @return the request count + */ public int getRequestCount() { return getRequestCount(apiServer()); } + /** + * Gets the request count. + * + * @param server + * the server + * @return the request count + */ public static int getRequestCount(WireMockServer server) { return server.countRequestsMatching(RequestPatternBuilder.allRequests().build()).getCount(); } @@ -314,6 +399,13 @@ private Path renameFileToIndex(Path filePath, Map.Entry idToInde return targetPath; } + /** + * Map to mock git hub. + * + * @param body + * the body + * @return the string + */ @Nonnull public String mapToMockGitHub(String body) { body = body.replace("https://api.github.com", this.apiServer().baseUrl()); diff --git a/src/test/java/org/kohsuke/github/junit/WireMockMultiServerRule.java b/src/test/java/org/kohsuke/github/junit/WireMockMultiServerRule.java index 81e1a958d8..3d99281cf2 100644 --- a/src/test/java/org/kohsuke/github/junit/WireMockMultiServerRule.java +++ b/src/test/java/org/kohsuke/github/junit/WireMockMultiServerRule.java @@ -18,6 +18,7 @@ import java.util.List; import java.util.Map; +// TODO: Auto-generated Javadoc /** * The standard WireMockRule eagerly initializes a WireMockServer. This version supports multiple servers in one rule * and takes a lazy approach to intitialization allowing us to isolate files snapshots for each method. @@ -26,33 +27,76 @@ */ public class WireMockMultiServerRule implements MethodRule, TestRule { + /** The servers. */ protected final Map servers = new HashMap<>(); private boolean failOnUnmatchedRequests; private final Options options; + /** + * Gets the method name. + * + * @return the method name + */ public String getMethodName() { return methodName; } private String methodName = null; + /** + * Instantiates a new wire mock multi server rule. + * + * @param options + * the options + */ public WireMockMultiServerRule(Options options) { this(options, true); } + /** + * Instantiates a new wire mock multi server rule. + * + * @param options + * the options + * @param failOnUnmatchedRequests + * the fail on unmatched requests + */ public WireMockMultiServerRule(Options options, boolean failOnUnmatchedRequests) { this.options = options; this.failOnUnmatchedRequests = failOnUnmatchedRequests; } + /** + * Instantiates a new wire mock multi server rule. + */ public WireMockMultiServerRule() { this(WireMockRuleConfiguration.wireMockConfig()); } + /** + * Apply. + * + * @param base + * the base + * @param description + * the description + * @return the statement + */ public Statement apply(Statement base, Description description) { return this.apply(base, description.getMethodName()); } + /** + * Apply. + * + * @param base + * the base + * @param method + * the method + * @param target + * the target + * @return the statement + */ public Statement apply(final Statement base, FrameworkMethod method, Object target) { return this.apply(base, method.getName()); } @@ -79,9 +123,20 @@ public void evaluate() throws Throwable { }; } + /** + * Initialize servers. + */ protected void initializeServers() { } + /** + * Initialize server. + * + * @param serverId + * the server id + * @param extensions + * the extensions + */ protected final void initializeServer(String serverId, Extension... extensions) { String directoryName = methodName; if (!serverId.equals("default")) { @@ -104,9 +159,15 @@ protected final void initializeServer(String serverId, Extension... extensions) } } + /** + * Before. + */ protected void before() { } + /** + * After. + */ protected void after() { } diff --git a/src/test/java/org/kohsuke/github/junit/WireMockRule.java b/src/test/java/org/kohsuke/github/junit/WireMockRule.java index 0e5340fb54..f65e4cf11a 100644 --- a/src/test/java/org/kohsuke/github/junit/WireMockRule.java +++ b/src/test/java/org/kohsuke/github/junit/WireMockRule.java @@ -34,7 +34,10 @@ import java.util.List; import java.util.UUID; +// TODO: Auto-generated Javadoc /** + * The Class WireMockRule. + * * @author Liam Newman */ public class WireMockRule implements MethodRule, TestRule, Container, Stubbing, Admin { @@ -43,37 +46,93 @@ public class WireMockRule implements MethodRule, TestRule, Container, Stubbing, private boolean failOnUnmatchedRequests; private final Options options; + /** + * Gets the method name. + * + * @return the method name + */ public String getMethodName() { return methodName; } private String methodName = null; + /** + * Instantiates a new wire mock rule. + * + * @param options + * the options + */ public WireMockRule(Options options) { this(options, true); } + /** + * Instantiates a new wire mock rule. + * + * @param options + * the options + * @param failOnUnmatchedRequests + * the fail on unmatched requests + */ public WireMockRule(Options options, boolean failOnUnmatchedRequests) { this.options = options; this.failOnUnmatchedRequests = failOnUnmatchedRequests; } + /** + * Instantiates a new wire mock rule. + * + * @param port + * the port + */ public WireMockRule(int port) { this(WireMockConfiguration.wireMockConfig().port(port)); } + /** + * Instantiates a new wire mock rule. + * + * @param port + * the port + * @param httpsPort + * the https port + */ public WireMockRule(int port, Integer httpsPort) { this(WireMockConfiguration.wireMockConfig().port(port).httpsPort(httpsPort)); } + /** + * Instantiates a new wire mock rule. + */ public WireMockRule() { this(WireMockRuleConfiguration.wireMockConfig()); } + /** + * Apply. + * + * @param base + * the base + * @param description + * the description + * @return the statement + */ public Statement apply(Statement base, Description description) { return this.apply(base, description.getMethodName()); } + /** + * Apply. + * + * @param base + * the base + * @param method + * the method + * @param target + * the target + * @return the statement + */ public Statement apply(final Statement base, FrameworkMethod method, Object target) { return this.apply(base, method.getName()); } @@ -120,288 +179,691 @@ private void checkForUnmatchedRequests() { } + /** + * Before. + */ protected void before() { } + /** + * After. + */ protected void after() { } + /** + * Load mappings using. + * + * @param mappingsLoader + * the mappings loader + */ public void loadMappingsUsing(MappingsLoader mappingsLoader) { wireMockServer.loadMappingsUsing(mappingsLoader); } + /** + * Gets the global settings holder. + * + * @return the global settings holder + */ public GlobalSettingsHolder getGlobalSettingsHolder() { return wireMockServer.getGlobalSettingsHolder(); } + /** + * Adds the mock service request listener. + * + * @param listener + * the listener + */ public void addMockServiceRequestListener(RequestListener listener) { wireMockServer.addMockServiceRequestListener(listener); } + /** + * Enable record mappings. + * + * @param mappingsFileSource + * the mappings file source + * @param filesFileSource + * the files file source + */ public void enableRecordMappings(FileSource mappingsFileSource, FileSource filesFileSource) { wireMockServer.enableRecordMappings(mappingsFileSource, filesFileSource); } + /** + * Stop. + */ public void stop() { wireMockServer.stop(); } + /** + * Start. + */ public void start() { wireMockServer.start(); } + /** + * Shutdown. + */ public void shutdown() { wireMockServer.shutdown(); } + /** + * Port. + * + * @return the int + */ public int port() { return wireMockServer.port(); } + /** + * Https port. + * + * @return the int + */ public int httpsPort() { return wireMockServer.httpsPort(); } + /** + * Url. + * + * @param path + * the path + * @return the string + */ public String url(String path) { return wireMockServer.url(path); } + /** + * Base url. + * + * @return the string + */ public String baseUrl() { return wireMockServer.baseUrl(); } + /** + * Checks if is running. + * + * @return true, if is running + */ public boolean isRunning() { return wireMockServer.isRunning(); } + /** + * Given that. + * + * @param mappingBuilder + * the mapping builder + * @return the stub mapping + */ public StubMapping givenThat(MappingBuilder mappingBuilder) { return wireMockServer.givenThat(mappingBuilder); } + /** + * Stub for. + * + * @param mappingBuilder + * the mapping builder + * @return the stub mapping + */ public StubMapping stubFor(MappingBuilder mappingBuilder) { return wireMockServer.stubFor(mappingBuilder); } + /** + * Edits the stub. + * + * @param mappingBuilder + * the mapping builder + */ public void editStub(MappingBuilder mappingBuilder) { wireMockServer.editStub(mappingBuilder); } + /** + * Removes the stub. + * + * @param mappingBuilder + * the mapping builder + */ public void removeStub(MappingBuilder mappingBuilder) { wireMockServer.removeStub(mappingBuilder); } + /** + * Removes the stub. + * + * @param stubMapping + * the stub mapping + */ public void removeStub(StubMapping stubMapping) { wireMockServer.removeStub(stubMapping); } + /** + * Gets the stub mappings. + * + * @return the stub mappings + */ public List getStubMappings() { return wireMockServer.getStubMappings(); } + /** + * Gets the single stub mapping. + * + * @param id + * the id + * @return the single stub mapping + */ public StubMapping getSingleStubMapping(UUID id) { return wireMockServer.getSingleStubMapping(id); } + /** + * Find stub mappings by metadata. + * + * @param pattern + * the pattern + * @return the list + */ public List findStubMappingsByMetadata(StringValuePattern pattern) { return wireMockServer.findStubMappingsByMetadata(pattern); } + /** + * Removes the stub mappings by metadata. + * + * @param pattern + * the pattern + */ public void removeStubMappingsByMetadata(StringValuePattern pattern) { wireMockServer.removeStubMappingsByMetadata(pattern); } + /** + * Removes the stub mapping. + * + * @param stubMapping + * the stub mapping + */ public void removeStubMapping(StubMapping stubMapping) { wireMockServer.removeStubMapping(stubMapping); } + /** + * Verify. + * + * @param requestPatternBuilder + * the request pattern builder + */ public void verify(RequestPatternBuilder requestPatternBuilder) { wireMockServer.verify(requestPatternBuilder); } + /** + * Verify. + * + * @param count + * the count + * @param requestPatternBuilder + * the request pattern builder + */ public void verify(int count, RequestPatternBuilder requestPatternBuilder) { wireMockServer.verify(count, requestPatternBuilder); } + /** + * Verify. + * + * @param countMatchingStrategy + * the count matching strategy + * @param requestPatternBuilder + * the request pattern builder + */ public void verify(CountMatchingStrategy countMatchingStrategy, RequestPatternBuilder requestPatternBuilder) { wireMockServer.verify(countMatchingStrategy, requestPatternBuilder); } + /** + * Find all. + * + * @param requestPatternBuilder + * the request pattern builder + * @return the list + */ public List findAll(RequestPatternBuilder requestPatternBuilder) { return wireMockServer.findAll(requestPatternBuilder); } + /** + * Gets the all serve events. + * + * @return the all serve events + */ public List getAllServeEvents() { return wireMockServer.getAllServeEvents(); } + /** + * Sets the global fixed delay. + * + * @param milliseconds + * the new global fixed delay + */ public void setGlobalFixedDelay(int milliseconds) { wireMockServer.setGlobalFixedDelay(milliseconds); } + /** + * Find all unmatched requests. + * + * @return the list + */ public List findAllUnmatchedRequests() { return wireMockServer.findAllUnmatchedRequests(); } + /** + * Find near misses for all unmatched requests. + * + * @return the list + */ public List findNearMissesForAllUnmatchedRequests() { return wireMockServer.findNearMissesForAllUnmatchedRequests(); } + /** + * Find all near misses for. + * + * @param requestPatternBuilder + * the request pattern builder + * @return the list + */ public List findAllNearMissesFor(RequestPatternBuilder requestPatternBuilder) { return wireMockServer.findAllNearMissesFor(requestPatternBuilder); } + /** + * Find near misses for. + * + * @param loggedRequest + * the logged request + * @return the list + */ public List findNearMissesFor(LoggedRequest loggedRequest) { return wireMockServer.findNearMissesFor(loggedRequest); } + /** + * Adds the stub mapping. + * + * @param stubMapping + * the stub mapping + */ public void addStubMapping(StubMapping stubMapping) { wireMockServer.addStubMapping(stubMapping); } + /** + * Edits the stub mapping. + * + * @param stubMapping + * the stub mapping + */ public void editStubMapping(StubMapping stubMapping) { wireMockServer.editStubMapping(stubMapping); } + /** + * List all stub mappings. + * + * @return the list stub mappings result + */ public ListStubMappingsResult listAllStubMappings() { return wireMockServer.listAllStubMappings(); } + /** + * Gets the stub mapping. + * + * @param id + * the id + * @return the stub mapping + */ public SingleStubMappingResult getStubMapping(UUID id) { return wireMockServer.getStubMapping(id); } + /** + * Save mappings. + */ public void saveMappings() { wireMockServer.saveMappings(); } + /** + * Reset all. + */ public void resetAll() { wireMockServer.resetAll(); } + /** + * Reset requests. + */ public void resetRequests() { wireMockServer.resetRequests(); } + /** + * Reset to default mappings. + */ public void resetToDefaultMappings() { wireMockServer.resetToDefaultMappings(); } + /** + * Gets the serve events. + * + * @return the serve events + */ public GetServeEventsResult getServeEvents() { return wireMockServer.getServeEvents(); } + /** + * Gets the serve events. + * + * @param serveEventQuery + * the serve event query + * @return the serve events + */ public GetServeEventsResult getServeEvents(ServeEventQuery serveEventQuery) { return wireMockServer.getServeEvents(serveEventQuery); } + /** + * Gets the served stub. + * + * @param id + * the id + * @return the served stub + */ public SingleServedStubResult getServedStub(UUID id) { return wireMockServer.getServedStub(id); } + /** + * Reset scenarios. + */ public void resetScenarios() { wireMockServer.resetScenarios(); } + /** + * Reset mappings. + */ public void resetMappings() { wireMockServer.resetMappings(); } + /** + * Count requests matching. + * + * @param requestPattern + * the request pattern + * @return the verification result + */ public VerificationResult countRequestsMatching(RequestPattern requestPattern) { return wireMockServer.countRequestsMatching(requestPattern); } + /** + * Find requests matching. + * + * @param requestPattern + * the request pattern + * @return the find requests result + */ public FindRequestsResult findRequestsMatching(RequestPattern requestPattern) { return wireMockServer.findRequestsMatching(requestPattern); } + /** + * Find unmatched requests. + * + * @return the find requests result + */ public FindRequestsResult findUnmatchedRequests() { return wireMockServer.findUnmatchedRequests(); } + /** + * Removes the serve event. + * + * @param uuid + * the uuid + */ public void removeServeEvent(UUID uuid) { wireMockServer.removeServeEvent(uuid); } + /** + * Removes the serve events matching. + * + * @param requestPattern + * the request pattern + * @return the find serve events result + */ public FindServeEventsResult removeServeEventsMatching(RequestPattern requestPattern) { return wireMockServer.removeServeEventsMatching(requestPattern); } + /** + * Removes the serve events for stubs matching metadata. + * + * @param stringValuePattern + * the string value pattern + * @return the find serve events result + */ public FindServeEventsResult removeServeEventsForStubsMatchingMetadata(StringValuePattern stringValuePattern) { return wireMockServer.removeServeEventsForStubsMatchingMetadata(stringValuePattern); } + /** + * Update global settings. + * + * @param newSettings + * the new settings + */ public void updateGlobalSettings(GlobalSettings newSettings) { wireMockServer.updateGlobalSettings(newSettings); } + /** + * Find near misses for unmatched requests. + * + * @return the find near misses result + */ public FindNearMissesResult findNearMissesForUnmatchedRequests() { return wireMockServer.findNearMissesForUnmatchedRequests(); } + /** + * Gets the all scenarios. + * + * @return the all scenarios + */ public GetScenariosResult getAllScenarios() { return wireMockServer.getAllScenarios(); } + /** + * Find top near misses for. + * + * @param loggedRequest + * the logged request + * @return the find near misses result + */ public FindNearMissesResult findTopNearMissesFor(LoggedRequest loggedRequest) { return wireMockServer.findTopNearMissesFor(loggedRequest); } + /** + * Find top near misses for. + * + * @param requestPattern + * the request pattern + * @return the find near misses result + */ public FindNearMissesResult findTopNearMissesFor(RequestPattern requestPattern) { return wireMockServer.findTopNearMissesFor(requestPattern); } + /** + * Start recording. + * + * @param targetBaseUrl + * the target base url + */ public void startRecording(String targetBaseUrl) { wireMockServer.startRecording(targetBaseUrl); } + /** + * Start recording. + * + * @param spec + * the spec + */ public void startRecording(RecordSpec spec) { wireMockServer.startRecording(spec); } + /** + * Start recording. + * + * @param recordSpec + * the record spec + */ public void startRecording(RecordSpecBuilder recordSpec) { wireMockServer.startRecording(recordSpec); } + /** + * Stop recording. + * + * @return the snapshot record result + */ public SnapshotRecordResult stopRecording() { return wireMockServer.stopRecording(); } + /** + * Gets the recording status. + * + * @return the recording status + */ public RecordingStatusResult getRecordingStatus() { return wireMockServer.getRecordingStatus(); } + /** + * Snapshot record. + * + * @return the snapshot record result + */ public SnapshotRecordResult snapshotRecord() { return wireMockServer.snapshotRecord(); } + /** + * Snapshot record. + * + * @param spec + * the spec + * @return the snapshot record result + */ public SnapshotRecordResult snapshotRecord(RecordSpecBuilder spec) { return wireMockServer.snapshotRecord(spec); } + /** + * Snapshot record. + * + * @param spec + * the spec + * @return the snapshot record result + */ public SnapshotRecordResult snapshotRecord(RecordSpec spec) { return wireMockServer.snapshotRecord(spec); } + /** + * Gets the options. + * + * @return the options + */ public Options getOptions() { return wireMockServer.getOptions(); } + /** + * Shutdown server. + */ public void shutdownServer() { wireMockServer.shutdownServer(); } + /** + * Find all stubs by metadata. + * + * @param pattern + * the pattern + * @return the list stub mappings result + */ public ListStubMappingsResult findAllStubsByMetadata(StringValuePattern pattern) { return wireMockServer.findAllStubsByMetadata(pattern); } + /** + * Removes the stubs by metadata. + * + * @param pattern + * the pattern + */ public void removeStubsByMetadata(StringValuePattern pattern) { wireMockServer.removeStubsByMetadata(pattern); } + /** + * Import stubs. + * + * @param stubImport + * the stub import + */ public void importStubs(StubImport stubImport) { wireMockServer.importStubs(stubImport); } + /** + * Gets the global settings. + * + * @return the global settings + */ public GetGlobalSettingsResult getGlobalSettings() { return wireMockServer.getGlobalSettings(); } diff --git a/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java b/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java index 478e14272a..ee8f953130 100644 --- a/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java +++ b/src/test/java/org/kohsuke/github/junit/WireMockRuleConfiguration.java @@ -22,6 +22,10 @@ import java.util.List; import java.util.Map; +// TODO: Auto-generated Javadoc +/** + * The Class WireMockRuleConfiguration. + */ public class WireMockRuleConfiguration implements Options { private final Options parent; @@ -29,24 +33,54 @@ public class WireMockRuleConfiguration implements Options { private MappingsSource mappingsSource; private Map extensions = Maps.newLinkedHashMap(); + /** + * Instantiates a new wire mock rule configuration. + */ WireMockRuleConfiguration() { this(WireMockConfiguration.options(), null); } + /** + * Instantiates a new wire mock rule configuration. + * + * @param parent + * the parent + * @param childDirectory + * the child directory + * @param extensionInstances + * the extension instances + */ WireMockRuleConfiguration(Options parent, String childDirectory, Extension... extensionInstances) { this.parent = parent; this.childDirectory = childDirectory; this.extensions.putAll(ExtensionLoader.asMap(Arrays.asList(extensionInstances))); } + /** + * Wire mock config. + * + * @return the wire mock rule configuration + */ public static WireMockRuleConfiguration wireMockConfig() { return new WireMockRuleConfiguration(); } + /** + * Options. + * + * @return the wire mock rule configuration + */ public static WireMockRuleConfiguration options() { return wireMockConfig(); } + /** + * For child path. + * + * @param childPath + * the child path + * @return the wire mock rule configuration + */ public WireMockRuleConfiguration forChildPath(String childPath) { return new WireMockRuleConfiguration(this, childPath); } @@ -59,23 +93,54 @@ private MappingsSource getMappingsSource() { return this.mappingsSource; } + /** + * Files root. + * + * @return the file source + */ public FileSource filesRoot() { return childDirectory != null ? parent.filesRoot().child(childDirectory) : parent.filesRoot(); } + /** + * Mappings loader. + * + * @return the mappings loader + */ public MappingsLoader mappingsLoader() { return this.getMappingsSource(); } + /** + * Mappings saver. + * + * @return the mappings saver + */ public MappingsSaver mappingsSaver() { return this.getMappingsSource(); } + /** + * Mapping source. + * + * @param mappingsSource + * the mappings source + * @return the wire mock rule configuration + */ public WireMockRuleConfiguration mappingSource(MappingsSource mappingsSource) { this.mappingsSource = mappingsSource; return this; } + /** + * Extensions of type. + * + * @param + * the generic type + * @param extensionType + * the extension type + * @return the map + */ public Map extensionsOfType(Class extensionType) { Map result = Maps.newLinkedHashMap(this.parent.extensionsOfType(extensionType)); result.putAll((Map) Maps.filterEntries(this.extensions, @@ -85,118 +150,263 @@ public Map extensionsOfType(Class extensionT // Simple wrappers + /** + * Port number. + * + * @return the int + */ public int portNumber() { return parent.portNumber(); } + /** + * Gets the http disabled. + * + * @return the http disabled + */ public boolean getHttpDisabled() { return parent.getHttpDisabled(); } + /** + * Container threads. + * + * @return the int + */ public int containerThreads() { return parent.containerThreads(); } + /** + * Https settings. + * + * @return the https settings + */ public HttpsSettings httpsSettings() { return parent.httpsSettings(); } + /** + * Jetty settings. + * + * @return the jetty settings + */ public JettySettings jettySettings() { return parent.jettySettings(); } + /** + * Browser proxying enabled. + * + * @return true, if successful + */ public boolean browserProxyingEnabled() { return parent.browserProxyingEnabled(); } + /** + * Browser proxy settings. + * + * @return the browser proxy settings + */ public BrowserProxySettings browserProxySettings() { return parent.browserProxySettings(); } + /** + * Proxy via. + * + * @return the proxy settings + */ public ProxySettings proxyVia() { return parent.proxyVia(); } + /** + * Notifier. + * + * @return the notifier + */ public Notifier notifier() { return parent.notifier(); } + /** + * Request journal disabled. + * + * @return true, if successful + */ public boolean requestJournalDisabled() { return parent.requestJournalDisabled(); } + /** + * Max request journal entries. + * + * @return the optional + */ public Optional maxRequestJournalEntries() { return parent.maxRequestJournalEntries(); } + /** + * Bind address. + * + * @return the string + */ public String bindAddress() { return parent.bindAddress(); } + /** + * Matching headers. + * + * @return the list + */ public List matchingHeaders() { return parent.matchingHeaders(); } + /** + * Http server factory. + * + * @return the http server factory + */ public HttpServerFactory httpServerFactory() { return parent.httpServerFactory(); } + /** + * Thread pool factory. + * + * @return the thread pool factory + */ public ThreadPoolFactory threadPoolFactory() { return parent.threadPoolFactory(); } + /** + * Should preserve host header. + * + * @return true, if successful + */ public boolean shouldPreserveHostHeader() { return parent.shouldPreserveHostHeader(); } + /** + * Proxy host header. + * + * @return the string + */ public String proxyHostHeader() { return parent.proxyHostHeader(); } + /** + * Network traffic listener. + * + * @return the wiremock network traffic listener + */ public WiremockNetworkTrafficListener networkTrafficListener() { return parent.networkTrafficListener(); } + /** + * Gets the admin authenticator. + * + * @return the admin authenticator + */ public Authenticator getAdminAuthenticator() { return parent.getAdminAuthenticator(); } + /** + * Gets the https required for admin api. + * + * @return the https required for admin api + */ public boolean getHttpsRequiredForAdminApi() { return parent.getHttpsRequiredForAdminApi(); } + /** + * Gets the not matched renderer. + * + * @return the not matched renderer + */ public NotMatchedRenderer getNotMatchedRenderer() { return parent.getNotMatchedRenderer(); } + /** + * Gets the asynchronous response settings. + * + * @return the asynchronous response settings + */ public AsynchronousResponseSettings getAsynchronousResponseSettings() { return parent.getAsynchronousResponseSettings(); } + /** + * Gets the chunked encoding policy. + * + * @return the chunked encoding policy + */ public ChunkedEncodingPolicy getChunkedEncodingPolicy() { return parent.getChunkedEncodingPolicy(); } + /** + * Gets the gzip disabled. + * + * @return the gzip disabled + */ public boolean getGzipDisabled() { return parent.getGzipDisabled(); } + /** + * Gets the stub request logging disabled. + * + * @return the stub request logging disabled + */ public boolean getStubRequestLoggingDisabled() { return parent.getStubRequestLoggingDisabled(); } + /** + * Gets the stub cors enabled. + * + * @return the stub cors enabled + */ public boolean getStubCorsEnabled() { return parent.getStubCorsEnabled(); } + /** + * Timeout. + * + * @return the long + */ public long timeout() { return parent.timeout(); } + /** + * Gets the disable optimize xml factories loading. + * + * @return the disable optimize xml factories loading + */ public boolean getDisableOptimizeXmlFactoriesLoading() { return parent.getDisableOptimizeXmlFactoriesLoading(); } + /** + * Gets the disable strict http headers. + * + * @return the disable strict http headers + */ public boolean getDisableStrictHttpHeaders() { return parent.getDisableStrictHttpHeaders(); }