mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-07-04 01:32:14 +00:00
Fix code formatting
Issue gh-9146
This commit is contained in:
parent
339da36878
commit
b182d9def1
@ -38,22 +38,23 @@ public class OAuth2RefreshTokenTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void constructorWhenTokenValueIsNullThenThrowIllegalArgumentException() {
|
public void constructorWhenTokenValueIsNullThenThrowIllegalArgumentException() {
|
||||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
assertThatIllegalArgumentException().isThrownBy(() -> new OAuth2RefreshToken(null, ISSUED_AT, EXPIRES_AT))
|
||||||
new OAuth2RefreshToken(null, ISSUED_AT, EXPIRES_AT))
|
|
||||||
.withMessage("tokenValue cannot be empty");
|
.withMessage("tokenValue cannot be empty");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void constructorWhenIssuedAtAfterExpiresAtThenThrowIllegalArgumentException() {
|
public void constructorWhenIssuedAtAfterExpiresAtThenThrowIllegalArgumentException() {
|
||||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
assertThatIllegalArgumentException()
|
||||||
new OAuth2RefreshToken(TOKEN_VALUE, Instant.from(EXPIRES_AT).plusSeconds(1), EXPIRES_AT))
|
.isThrownBy(
|
||||||
|
() -> new OAuth2RefreshToken(TOKEN_VALUE, Instant.from(EXPIRES_AT).plusSeconds(1), EXPIRES_AT))
|
||||||
.withMessage("expiresAt must be after issuedAt");
|
.withMessage("expiresAt must be after issuedAt");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void constructorWhenExpiresAtBeforeIssuedAtThenThrowIllegalArgumentException() {
|
public void constructorWhenExpiresAtBeforeIssuedAtThenThrowIllegalArgumentException() {
|
||||||
assertThatIllegalArgumentException().isThrownBy(() ->
|
assertThatIllegalArgumentException()
|
||||||
new OAuth2RefreshToken(TOKEN_VALUE, ISSUED_AT, Instant.from(ISSUED_AT).minusSeconds(1)))
|
.isThrownBy(
|
||||||
|
() -> new OAuth2RefreshToken(TOKEN_VALUE, ISSUED_AT, Instant.from(ISSUED_AT).minusSeconds(1)))
|
||||||
.withMessage("expiresAt must be after issuedAt");
|
.withMessage("expiresAt must be after issuedAt");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user