Class AbstractGitHubWireMockTest

    • Field Detail

      • useDefaultGitHub

        protected boolean useDefaultGitHub
      • tempGitHubRepositories

        protected final Set<String> tempGitHubRepositories
      • gitHub

        protected GitHub gitHub
        GitHub instance for use during test. Traffic will be part of snapshot when taken.
      • baseFilesClassPath

        protected final String baseFilesClassPath
      • baseRecordPath

        protected final String baseRecordPath
    • Constructor Detail

      • AbstractGitHubWireMockTest

        public AbstractGitHubWireMockTest()
    • Method Detail

      • getWireMockOptions

        protected com.github.tomakehurst.wiremock.core.WireMockConfiguration getWireMockOptions()
      • snapshotNotAllowed

        protected void snapshotNotAllowed()
      • requireProxy

        protected void requireProxy​(String reason)
      • verifyAuthenticated

        protected void verifyAuthenticated​(GitHub instance)
      • getUser

        protected GHUser getUser()
      • getUser

        protected static GHUser getUser​(GitHub gitHub)
      • getTempRepository

        protected GHRepository getTempRepository()
                                          throws IOException
        Creates a temporary repository that will be deleted at the end of the test. Repository name is based on the current test method.
        Returns:
        a temporary repository
        Throws:
        IOException - if repository could not be created or retrieved.
      • getTempRepository

        protected GHRepository getTempRepository​(String name)
                                          throws IOException
        Creates a temporary repository that will be deleted at the end of the test.
        Parameters:
        name - string name of the the repository
        Returns:
        a temporary repository
        Throws:
        IOException - if repository could not be created or retrieved.
      • getNonRecordingGitHub

        public GitHub getNonRecordingGitHub()
        GitHub instance for use before/after test. Traffic will not be part of snapshot when taken. Should only be used when isUseProxy() or isTakeSnapShot().
        Returns:
        a github instance after checking Authentication
      • kohsuke

        protected void kohsuke()
      • fail

        public static void fail()
      • fail

        public static void fail​(String reason)
      • assertThat

        public static <T> void assertThat​(T actual,
                                          org.hamcrest.Matcher<? super T> matcher)
      • assertThat

        public static <T> void assertThat​(String reason,
                                          T actual,
                                          org.hamcrest.Matcher<? super T> matcher)
      • assertThat

        public static void assertThat​(String reason,
                                      boolean assertion)