Skip to content

Commit de1c410

Browse files
authored
Add javadoc to tests
1 parent 532fa98 commit de1c410

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/test/java/org/kohsuke/github/extras/authorization/AuthorizationTokenRefreshTest.java

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,31 @@
99

1010
import java.io.IOException;
1111

12+
/**
13+
* Test authorization token refresh.
14+
*/
1215
public class AuthorizationTokenRefreshTest extends AbstractGitHubWireMockTest {
1316

17+
/**
18+
* Instantiates a new test.
19+
*/
1420
public AuthorizationTokenRefreshTest() throws IOException {
1521
useDefaultGitHub = false;
1622
}
1723

24+
/**
25+
* Gets the wire mock options.
26+
*
27+
* @return the wire mock options
28+
*/
1829
@Override
1930
protected WireMockConfiguration getWireMockOptions() {
2031
return super.getWireMockOptions().extensions(templating.newResponseTransformer());
2132
}
2233

34+
/**
35+
* Retried request should get new token when the old one expires.
36+
*/
2337
@Test
2438
public void testRetriedRequestGetsNewAuthorizationTokenWhenOldOneExpires() throws IOException {
2539
snapshotNotAllowed();
@@ -31,6 +45,9 @@ public void testRetriedRequestGetsNewAuthorizationTokenWhenOldOneExpires() throw
3145
assertThat("Usernames match", "kohsuke".equals(kohsuke.getLogin()));
3246
}
3347

48+
/**
49+
* Retried request should not get new token when the old one is still valid.
50+
*/
3451
@Test
3552
public void testRetriedRequestDoesNotGetNewAuthorizationTokenWhenOldOneIsStillValid() throws IOException {
3653
gitHub = getGitHubBuilder().withAuthorizationProvider(() -> "original token")

0 commit comments

Comments
 (0)