|
|
|
@ -159,14 +159,20 @@ public class XorCsrfTokenRequestAttributeHandlerTests { |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void resolveCsrfTokenValueWhenRequestIsNullThenThrowsIllegalArgumentException() { |
|
|
|
public void resolveCsrfTokenValueWhenRequestIsNullThenThrowsIllegalArgumentException() { |
|
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.handler.resolveCsrfTokenValue(null, this.token)) |
|
|
|
// @formatter:off
|
|
|
|
|
|
|
|
assertThatIllegalArgumentException() |
|
|
|
|
|
|
|
.isThrownBy(() -> this.handler.resolveCsrfTokenValue(null, this.token)) |
|
|
|
.withMessage("request cannot be null"); |
|
|
|
.withMessage("request cannot be null"); |
|
|
|
|
|
|
|
// @formatter:on
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
public void resolveCsrfTokenValueWhenCsrfTokenIsNullThenThrowsIllegalArgumentException() { |
|
|
|
public void resolveCsrfTokenValueWhenCsrfTokenIsNullThenThrowsIllegalArgumentException() { |
|
|
|
assertThatIllegalArgumentException().isThrownBy(() -> this.handler.resolveCsrfTokenValue(this.request, null)) |
|
|
|
// @formatter:off
|
|
|
|
|
|
|
|
assertThatIllegalArgumentException() |
|
|
|
|
|
|
|
.isThrownBy(() -> this.handler.resolveCsrfTokenValue(this.request, null)) |
|
|
|
.withMessage("csrfToken cannot be null"); |
|
|
|
.withMessage("csrfToken cannot be null"); |
|
|
|
|
|
|
|
// @formatter:on
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Test |
|
|
|
@Test |
|
|
|
|