Module org.kohsuke.github.api
Class AuthorizationTokenRefreshTest
java.lang.Object
org.kohsuke.github.AbstractGitHubWireMockTest
org.kohsuke.github.extras.authorization.AuthorizationTokenRefreshTest
Test authorization token refresh.
-
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
-
Method Summary
Modifier and TypeMethodDescriptionprotected com.github.tomakehurst.wiremock.core.WireMockConfiguration
Gets the wire mock options.void
Retried request should get new token when the old one expires.void
Retried request should not get new token when the old one is still valid.Methods inherited from class org.kohsuke.github.AbstractGitHubWireMockTest
assertThat, assertThat, assertThat, cleanupRepository, cleanupTempRepositories, fail, fail, getGitHubBuilder, getNonRecordingGitHub, getTempRepository, getTempRepository, getUser, getUser, kohsuke, requireProxy, snapshotNotAllowed, verifyAuthenticated, wireMockSetup
-
Constructor Details
-
AuthorizationTokenRefreshTest
public AuthorizationTokenRefreshTest()Instantiates a new test.
-
-
Method Details
-
getWireMockOptions
protected com.github.tomakehurst.wiremock.core.WireMockConfiguration getWireMockOptions()Gets the wire mock options.- Overrides:
getWireMockOptions
in classAbstractGitHubWireMockTest
- Returns:
- the wire mock options
-
testNewWhenOldOneExpires
Retried request should get new token when the old one expires.- Throws:
IOException
- the exception
-
testNotNewWhenOldOneIsStillValid
Retried request should not get new token when the old one is still valid.- Throws:
IOException
- the exception
-