mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-06-29 07:12:32 +00:00
Update Formatting
Issue gh-14178
This commit is contained in:
parent
6df9ef5ba6
commit
04394a63cd
@ -187,13 +187,12 @@ public class OidcIdTokenDecoderFactoryTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createDecoderWhenCustomRestOperationsFactorySetThenApplied() {
|
public void createDecoderWhenCustomRestOperationsFactorySetThenApplied() {
|
||||||
Function<ClientRegistration, RestOperations> customRestOperationsFactory = mock(
|
Function<ClientRegistration, RestOperations> customRestOperationsFactory = mock(Function.class);
|
||||||
Function.class);
|
|
||||||
this.idTokenDecoderFactory.setRestOperationsFactory(customRestOperationsFactory);
|
this.idTokenDecoderFactory.setRestOperationsFactory(customRestOperationsFactory);
|
||||||
ClientRegistration clientRegistration = this.registration.build();
|
ClientRegistration clientRegistration = this.registration.build();
|
||||||
given(customRestOperationsFactory.apply(same(clientRegistration)))
|
given(customRestOperationsFactory.apply(same(clientRegistration))).willReturn(new RestTemplate());
|
||||||
.willReturn(new RestTemplate());
|
|
||||||
this.idTokenDecoderFactory.createDecoder(clientRegistration);
|
this.idTokenDecoderFactory.createDecoder(clientRegistration);
|
||||||
verify(customRestOperationsFactory).apply(same(clientRegistration));
|
verify(customRestOperationsFactory).apply(same(clientRegistration));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -97,8 +97,7 @@ public class ReactiveOidcIdTokenDecoderFactoryTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void setWebClientFactoryWhenNullThenThrowIllegalArgumentException() {
|
public void setWebClientFactoryWhenNullThenThrowIllegalArgumentException() {
|
||||||
assertThatIllegalArgumentException()
|
assertThatIllegalArgumentException().isThrownBy(() -> this.idTokenDecoderFactory.setWebClientFactory(null));
|
||||||
.isThrownBy(() -> this.idTokenDecoderFactory.setWebClientFactory(null));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@ -185,13 +184,12 @@ public class ReactiveOidcIdTokenDecoderFactoryTests {
|
|||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void createDecoderWhenCustomWebClientFactorySetThenApplied() {
|
public void createDecoderWhenCustomWebClientFactorySetThenApplied() {
|
||||||
Function<ClientRegistration, WebClient> customWebClientFactory = mock(
|
Function<ClientRegistration, WebClient> customWebClientFactory = mock(Function.class);
|
||||||
Function.class);
|
|
||||||
this.idTokenDecoderFactory.setWebClientFactory(customWebClientFactory);
|
this.idTokenDecoderFactory.setWebClientFactory(customWebClientFactory);
|
||||||
ClientRegistration clientRegistration = this.registration.build();
|
ClientRegistration clientRegistration = this.registration.build();
|
||||||
given(customWebClientFactory.apply(same(clientRegistration)))
|
given(customWebClientFactory.apply(same(clientRegistration))).willReturn(WebClient.create());
|
||||||
.willReturn(WebClient.create());
|
|
||||||
this.idTokenDecoderFactory.createDecoder(clientRegistration);
|
this.idTokenDecoderFactory.createDecoder(clientRegistration);
|
||||||
verify(customWebClientFactory).apply(same(clientRegistration));
|
verify(customWebClientFactory).apply(same(clientRegistration));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user