Update Formatting

Issue gh-14178
This commit is contained in:
Josh Cummings 2024-01-22 08:26:25 -07:00
parent 6df9ef5ba6
commit 04394a63cd
No known key found for this signature in database
GPG Key ID: A306A51F43B8E5A5
2 changed files with 8 additions and 11 deletions

View File

@ -100,7 +100,7 @@ public class OidcIdTokenDecoderFactoryTests {
@Test
public void setRestOperationsFactoryWhenNullThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException()
.isThrownBy(() -> this.idTokenDecoderFactory.setRestOperationsFactory(null));
.isThrownBy(() -> this.idTokenDecoderFactory.setRestOperationsFactory(null));
}
@Test
@ -187,13 +187,12 @@ public class OidcIdTokenDecoderFactoryTests {
@Test
public void createDecoderWhenCustomRestOperationsFactorySetThenApplied() {
Function<ClientRegistration, RestOperations> customRestOperationsFactory = mock(
Function.class);
Function<ClientRegistration, RestOperations> customRestOperationsFactory = mock(Function.class);
this.idTokenDecoderFactory.setRestOperationsFactory(customRestOperationsFactory);
ClientRegistration clientRegistration = this.registration.build();
given(customRestOperationsFactory.apply(same(clientRegistration)))
.willReturn(new RestTemplate());
given(customRestOperationsFactory.apply(same(clientRegistration))).willReturn(new RestTemplate());
this.idTokenDecoderFactory.createDecoder(clientRegistration);
verify(customRestOperationsFactory).apply(same(clientRegistration));
}
}

View File

@ -97,8 +97,7 @@ public class ReactiveOidcIdTokenDecoderFactoryTests {
@Test
public void setWebClientFactoryWhenNullThenThrowIllegalArgumentException() {
assertThatIllegalArgumentException()
.isThrownBy(() -> this.idTokenDecoderFactory.setWebClientFactory(null));
assertThatIllegalArgumentException().isThrownBy(() -> this.idTokenDecoderFactory.setWebClientFactory(null));
}
@Test
@ -185,13 +184,12 @@ public class ReactiveOidcIdTokenDecoderFactoryTests {
@Test
public void createDecoderWhenCustomWebClientFactorySetThenApplied() {
Function<ClientRegistration, WebClient> customWebClientFactory = mock(
Function.class);
Function<ClientRegistration, WebClient> customWebClientFactory = mock(Function.class);
this.idTokenDecoderFactory.setWebClientFactory(customWebClientFactory);
ClientRegistration clientRegistration = this.registration.build();
given(customWebClientFactory.apply(same(clientRegistration)))
.willReturn(WebClient.create());
given(customWebClientFactory.apply(same(clientRegistration))).willReturn(WebClient.create());
this.idTokenDecoderFactory.createDecoder(clientRegistration);
verify(customWebClientFactory).apply(same(clientRegistration));
}
}