Skip to content

Commit

Permalink
Fix code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
jgrandja committed Oct 22, 2020
1 parent 339da36 commit b182d9d
Showing 1 changed file with 7 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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");
}

Expand Down

0 comments on commit b182d9d

Please sign in to comment.