Class GitHubTest


public class GitHubTest extends AbstractGitHubWireMockTest
Unit test for GitHub.
  • Constructor Details

    • GitHubTest

      public GitHubTest()
      Create default GitHubTest instance
  • Method Details

    • listUsers

      public void listUsers() throws IOException
      List users.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getRepository

      public void getRepository() throws IOException
      Gets the repository.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getOrgs

      public void getOrgs() throws IOException
      Gets the orgs.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • listOrganizationsFetchesType

      public void listOrganizationsFetchesType() throws IOException
      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

      public void searchContent() throws Exception
      Search content.
      Throws:
      Exception - the exception
    • searchContentWithForks

      public void searchContentWithForks()
      Search content with forks.
    • testListMyAuthorizations

      public void testListMyAuthorizations()
      Test list my authorizations.
    • getMeta

      public void getMeta() throws IOException
      Gets the meta.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • getMyMarketplacePurchases

      public void getMyMarketplacePurchases() throws IOException
      Gets the my marketplace purchases.
      Throws:
      IOException - Signals that an I/O exception has occurred.
    • gzip

      public void gzip() throws Exception
      Gzip.
      Throws:
      Exception - the exception
    • testHeaderFieldName

      public void testHeaderFieldName() throws Exception
      Test header field name.
      Throws:
      Exception - the exception
    • testCatchServiceDownException

      public void testCatchServiceDownException()
      Test expect GitHub ServiceDownException