Add gh-10130 to tests
This commit is contained in:
parent
acca3dba69
commit
fc553bf19a
|
@ -343,18 +343,21 @@ public class WebClientReactiveAuthorizationCodeTokenResponseClientTests {
|
|||
return new OAuth2AuthorizationCodeGrantRequest(registration, authorizationExchange);
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.setHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.addHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
||||
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|
||||
|
@ -380,6 +383,7 @@ public class WebClientReactiveAuthorizationCodeTokenResponseClientTests {
|
|||
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
||||
OAuth2AuthorizationCodeGrantRequest request = authorizationCodeGrantRequest();
|
||||
|
|
|
@ -214,18 +214,21 @@ public class WebClientReactiveClientCredentialsTokenResponseClientTests {
|
|||
this.server.enqueue(response);
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.client.setHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.client.addHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
||||
OAuth2ClientCredentialsGrantRequest request = new OAuth2ClientCredentialsGrantRequest(
|
||||
|
@ -251,6 +254,7 @@ public class WebClientReactiveClientCredentialsTokenResponseClientTests {
|
|||
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
||||
OAuth2ClientCredentialsGrantRequest request = new OAuth2ClientCredentialsGrantRequest(
|
||||
|
|
|
@ -218,18 +218,21 @@ public class WebClientReactivePasswordTokenResponseClientTests {
|
|||
// @formatter:on
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.setHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.addHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
||||
OAuth2PasswordGrantRequest request = new OAuth2PasswordGrantRequest(this.clientRegistrationBuilder.build(),
|
||||
|
@ -256,6 +259,7 @@ public class WebClientReactivePasswordTokenResponseClientTests {
|
|||
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
||||
OAuth2PasswordGrantRequest request = new OAuth2PasswordGrantRequest(this.clientRegistrationBuilder.build(),
|
||||
|
|
|
@ -221,18 +221,21 @@ public class WebClientReactiveRefreshTokenTokenResponseClientTests {
|
|||
// @formatter:on
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void setHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.setHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void addHeadersConverterWhenNullThenThrowIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.tokenResponseClient.addHeadersConverter(null))
|
||||
.withMessage("headersConverter cannot be null");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterAddedThenCalled() throws Exception {
|
||||
OAuth2RefreshTokenGrantRequest request = new OAuth2RefreshTokenGrantRequest(
|
||||
|
@ -259,6 +262,7 @@ public class WebClientReactiveRefreshTokenTokenResponseClientTests {
|
|||
assertThat(actualRequest.getHeader("custom-header-name")).isEqualTo("custom-header-value");
|
||||
}
|
||||
|
||||
// gh-10130
|
||||
@Test
|
||||
public void convertWhenHeadersConverterSetThenCalled() throws Exception {
|
||||
OAuth2RefreshTokenGrantRequest request = new OAuth2RefreshTokenGrantRequest(
|
||||
|
|
Loading…
Reference in New Issue