mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-22 05:49:04 +00:00
Update MockCookie#parse(String) validation to align with Javadoc
Signed-off-by: Tran Ngoc Nhan <ngocnhan.tran1996@gmail.com>
This commit is contained in:
@@ -118,7 +118,15 @@ class MockCookieTests {
|
||||
void parseNullHeader() {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> MockCookie.parse(null))
|
||||
.withMessageContaining("Set-Cookie header must not be null");
|
||||
.withMessageContaining("Set-Cookie header must not be null or empty");
|
||||
}
|
||||
|
||||
@ParameterizedTest
|
||||
@ValueSource(strings = {"", " "})
|
||||
void parseEmptyHeader(String header) {
|
||||
assertThatIllegalArgumentException()
|
||||
.isThrownBy(() -> MockCookie.parse(header))
|
||||
.withMessageContaining("Set-Cookie header must not be null or empty");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
||||
Reference in New Issue
Block a user