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 TypeMethodDescriptionvoidgetMeta()Gets the meta.voidGets the my marketplace purchases.voidgetOrgs()Gets the orgs.voidGets the repository.voidgzip()Gzip.voidVerifies that the `type` field is correctly fetched when listing organizations.voidList users.voidSearch content.voidSearch content with forks.voidSearch users.voidTest expect GitHubServiceDownExceptionvoidTest header field name.voidTest list all repositories.voidTest 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
-
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.
-
getOrgs
Gets the orgs.- Throws:
IOException- Signals that an I/O exception has occurred.
-
getRepository
Gets the repository.- Throws:
IOException- Signals that an I/O exception has occurred.
-
gzip
Gzip.- Throws:
Exception- the exception
-
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.
-
listUsers
List users.- Throws:
IOException- Signals that an I/O exception has occurred.
-
searchContent
Search content.- Throws:
Exception- the exception
-
searchContentWithForks
public void searchContentWithForks()Search content with forks. -
searchUsers
public void searchUsers()Search users. -
testCatchServiceDownException
public void testCatchServiceDownException()Test expect GitHubServiceDownException -
testHeaderFieldName
Test header field name.- Throws:
Exception- the exception
-
testListAllRepositories
public void testListAllRepositories()Test list all repositories. -
testListMyAuthorizations
public void testListMyAuthorizations()Test list my authorizations.
-