Polish gh-10911
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2018 the original author or authors.
|
||||
* Copyright 2002-2022 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -28,6 +28,7 @@ import org.springframework.security.authentication.UsernamePasswordAuthenticatio
|
||||
import org.springframework.security.core.Authentication;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
import static org.assertj.core.api.Assertions.assertThatIllegalArgumentException;
|
||||
|
||||
/**
|
||||
* @author Rob Winch
|
||||
@@ -39,6 +40,12 @@ public class ServerHttpBasicAuthenticationConverterTests {
|
||||
|
||||
MockServerHttpRequest.BaseBuilder<?> request = MockServerHttpRequest.get("/");
|
||||
|
||||
@Test
|
||||
public void setCredentialsCharsetWhenNullThenThrowsIllegalArgumentException() {
|
||||
assertThatIllegalArgumentException().isThrownBy(() -> this.converter.setCredentialsCharset(null))
|
||||
.withMessage("credentialsCharset cannot be null");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void applyWhenNoAuthorizationHeaderThenEmpty() {
|
||||
Mono<Authentication> result = apply(this.request);
|
||||
|
||||
Reference in New Issue
Block a user