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