java.lang.Object
org.kohsuke.github.AbstractGitHubWireMockTest
org.kohsuke.github.GitHubTest
Unit test for
GitHub
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
AbstractGitHubWireMockTest.TemplatingHelper
-
Field Summary
Fields inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
baseFilesClassPath, baseRecordPath, gitHub, mockGitHub, tempGitHubRepositories, templating, useDefaultGitHub
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
getMeta()
Gets the meta.void
Gets the my marketplace purchases.void
getOrgs()
Gets the orgs.void
Gets the repository.void
gzip()
Gzip.void
Verifies that the `type` field is correctly fetched when listing organizations.void
List users.void
Search content.void
Search content with forks.void
Search users.void
Test expect GitHubServiceDownException
void
Test header field name.void
Test list all repositories.void
Test list my authorizations.Methods inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
assertThat, assertThat, assertThat, cleanupRepository, cleanupTempRepositories, fail, fail, getGitHubBuilder, getNonRecordingGitHub, getTempRepository, getTempRepository, getUser, getUser, getWireMockOptions, kohsuke, requireProxy, snapshotNotAllowed, verifyAuthenticated, wireMockSetup
-
Constructor Details
-
GitHubTest
public GitHubTest()Create default GitHubTest instance
-
-
Method Details
-
listUsers
List users.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getRepository
Gets the repository.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getOrgs
Gets the orgs.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
listOrganizationsFetchesType
Verifies that the `type` field is correctly fetched when listing organizations.Since the `type` field is not included by default in the list of organizations, this test ensures that calling
getType()
retrieves the expected value.- Throws:
IOException
- if an I/O error occurs while fetching the organizations.
-
searchUsers
public void searchUsers()Search users. -
testListAllRepositories
public void testListAllRepositories()Test list all repositories. -
searchContent
Search content.- Throws:
Exception
- the exception
-
searchContentWithForks
public void searchContentWithForks()Search content with forks. -
testListMyAuthorizations
public void testListMyAuthorizations()Test list my authorizations. -
getMeta
Gets the meta.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
getMyMarketplacePurchases
Gets the my marketplace purchases.- Throws:
IOException
- Signals that an I/O exception has occurred.
-
gzip
Gzip.- Throws:
Exception
- the exception
-
testHeaderFieldName
Test header field name.- Throws:
Exception
- the exception
-
testCatchServiceDownException
public void testCatchServiceDownException()Test expect GitHubServiceDownException
-