Browse Source

Fix code formatting

Issue gh-9146
pull/9153/head
Joe Grandja 5 years ago
parent
commit
b182d9def1
  1. 13
      oauth2/oauth2-core/src/test/java/org/springframework/security/oauth2/core/OAuth2RefreshTokenTests.java

13
oauth2/oauth2-core/src/test/java/org/springframework/security/oauth2/core/OAuth2RefreshTokenTests.java

@ -38,22 +38,23 @@ public class OAuth2RefreshTokenTests { @@ -38,22 +38,23 @@ public class OAuth2RefreshTokenTests {
@Test
public void constructorWhenTokenValueIsNullThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(() ->
new OAuth2RefreshToken(null, ISSUED_AT, EXPIRES_AT))
assertThatIllegalArgumentException().isThrownBy(() -> new OAuth2RefreshToken(null, ISSUED_AT, EXPIRES_AT))
.withMessage("tokenValue cannot be empty");
}
@Test
public void constructorWhenIssuedAtAfterExpiresAtThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(() ->
new OAuth2RefreshToken(TOKEN_VALUE, Instant.from(EXPIRES_AT).plusSeconds(1), EXPIRES_AT))
assertThatIllegalArgumentException()
.isThrownBy(
() -> new OAuth2RefreshToken(TOKEN_VALUE, Instant.from(EXPIRES_AT).plusSeconds(1), EXPIRES_AT))
.withMessage("expiresAt must be after issuedAt");
}
@Test
public void constructorWhenExpiresAtBeforeIssuedAtThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException().isThrownBy(() ->
new OAuth2RefreshToken(TOKEN_VALUE, ISSUED_AT, Instant.from(ISSUED_AT).minusSeconds(1)))
assertThatIllegalArgumentException()
.isThrownBy(
() -> new OAuth2RefreshToken(TOKEN_VALUE, ISSUED_AT, Instant.from(ISSUED_AT).minusSeconds(1)))
.withMessage("expiresAt must be after issuedAt");
}

Loading…
Cancel
Save