Commit Graph

2548 Commits

Author SHA1 Message Date
Sam Brannen
30bee4db0f Polish Javadoc for MockPropertySource
(cherry picked from commit 6a6abac003)
2025-05-26 17:54:52 +02:00
Brian Clozel
c02d07fdef Fix multiple Content-Language values in MockHttpServletResponse
Prior to this commit, `MockHttpServletResponse` would only support
adding a `Content-Language` once. Adding multiple header values would
always replace the content-language property in the response and the
entire header value.

This commit ensures that this behavior is supported.

Fixes gh-34491
2025-02-25 17:57:27 +01:00
Brian Clozel
b5c89c91a9 Handle null values in MockHttpServletResponse#setHeader
Prior to this commit, `MockHttpServletResponse#setHeader` would not
remove the header entry when given a `null` value, as documented in the
Servlet API.
This commit ensures that this behavior is enforced.

Fixes gh-34466
2025-02-21 14:35:37 +01:00
Sam Brannen
5b928f47a8 Finish incomplete sentences
(cherry picked from commit 9d3374b28d)
2025-02-11 12:32:27 +01:00
Juergen Hoeller
aaf2e8fbe6 Polishing
(cherry picked from commit edf7f3cd43)
2024-12-04 17:35:50 +01:00
Juergen Hoeller
c765d03a59 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:44:59 +02:00
Juergen Hoeller
11d4272ff4 Use Locale.ROOT consistently for toLower/toUpperCase
Closes gh-33708
2024-10-16 13:36:23 +02:00
rstoyanchev
23656aebc6 Use Locale.ROOT consistently for toLower/toUpperCase
See gh-33708
2024-10-16 12:05:54 +01:00
Sam Brannen
5cc4d0a2ca Do not invoke AotTestExecutionListener for @⁠DisabledInAotMode tests
Closes gh-33589
2024-09-24 16:47:48 +02:00
Brian Clozel
fab889009a Support multiple async starts in MockHttpServletRequest
Closes gh-33457
2024-08-30 20:08:36 +02:00
rstoyanchev
186deb777f Update deprecation notices on rawStatusCode
Mark for removal where not marked, and set to 7.0
consistently as the target for removal.

See gh-33440
2024-08-28 18:49:49 +03:00
rstoyanchev
57cb8c7abf Restore rawStatusCode methods
Revert methods removed in 7df2e2a8d2.

See gh-33440
2024-08-28 18:12:26 +03:00
Sébastien Deleuze
0101945708 Prevent a leak in WebTestClient
This commit applies the same kind of processing for
Void.class element type in the ParameterizedTypeReference
variant of WebTestClient.ResponseSpec#returnResult than
in the Class variant.

Closes gh-33389
2024-08-19 10:46:47 +02:00
Stéphane Nicoll
481d036f7a Avoid reader on empty content to be shared by multiple requests
This commit avoids several instances of MockHttpServletRequest to
have a common reader for empty content as closing it will have an
unwanted side effect on the others.

Closes gh-32820
2024-05-20 13:58:36 +02:00
Sam Brannen
c1229b03a7 Polishing 2024-05-11 16:01:08 +02:00
Stéphane Nicoll
6250b64766 Add support for form data in MockHttpServletRequestBuilder
Closes gh-32757
2024-05-08 11:56:16 +02:00
Stéphane Nicoll
8a8c8fe00e Detect target of factory method with AOT
Previously, if a factory method is defined on a parent, the generated
code would blindly use the method's declaring class for both the target
of the generated code, and the signature of the method.

This commit improves the resolution by considering the factory metadata
in the BeanDefinition.

Closes gh-32609
2024-04-22 15:13:56 +02:00
Sébastien Deleuze
88b9c0567d Refine null-safety in spring-test
See gh-32475
2024-03-26 18:09:55 +01:00
Stéphane Nicoll
c7c9da56da Consistent atMost period for Awaitility-based tests
Closes gh-32537
2024-03-26 17:45:14 +01:00
Juergen Hoeller
c531a8a705 Nullability refinements and related polishing
See gh-32475
2024-03-19 09:58:44 +01:00
Juergen Hoeller
eb8b7c4331 Remove superfluous @NonNull declarations 2024-03-16 14:22:17 +01:00
Stéphane Nicoll
4983a802a7 Polish "Fix Javadoc"
See gh-32403
2024-03-09 16:02:01 +01:00
Maksim Sasnouski
abdccffa39 Fix Javadoc
This commit fixes various Javadoc issues across the code base.

See gh-32403
2024-03-09 16:02:00 +01:00
Sébastien Deleuze
cfd0aee4db Polish and add MockMvcExtensionsTests.queryParameter
Closes gh-32371
2024-03-05 10:59:12 +01:00
corby kim
132fbe228f Add query parameters to MockMvc Kotlin DSL
See gh-32371
2024-03-05 10:56:41 +01:00
Juergen Hoeller
e9110c0729 Polishing 2024-03-04 22:48:52 +01:00
Sam Brannen
de828e9764 Improve documentation for @⁠Sql execution phases regarding lifecycle
Closes gh-32343
2024-03-01 14:37:31 +01:00
Juergen Hoeller
f22a1eece4 Polishing 2024-02-28 19:14:37 +01:00
Stéphane Nicoll
c04d4da9a3 Polish 2024-02-05 09:11:04 +01:00
Stéphane Nicoll
ea52ecc5e0 Polish 2024-02-02 18:56:41 +01:00
Juergen Hoeller
7e5efdd8dd Reuse MapPropertySource for DynamicValuesPropertySource implementation
Closes gh-32110
2024-01-29 13:04:02 +01:00
Sam Brannen
3ce7c52030 Update copyright headers 2024-01-26 14:11:37 +01:00
Juergen Hoeller
d7778c0212 Polishing 2024-01-23 18:31:31 +01:00
Juergen Hoeller
531ac89e7e Expose sendError message as default body
Closes gh-26720
2024-01-23 18:31:26 +01:00
Sam Brannen
5856d2e54e Polish contribution
See gh-32069
2024-01-21 16:27:59 +01:00
mnhock
a8fa98e2a6 Remove unnecessary semicolons in enum declarations
Closes gh-32069
2024-01-21 16:25:36 +01:00
Stéphane Nicoll
1b312b6f3f Polish 2024-01-16 18:45:59 +01:00
Stéphane Nicoll
dc5a21fbd1 Remove outdated note
See gh-20606
2024-01-16 16:43:28 +01:00
Stéphane Nicoll
e0c5068d0b Fix incorrect assertions using json path
Closes gh-32036
2024-01-16 10:59:43 +01:00
Stéphane Nicoll
faba044735 Polish JsonPathExpectationsHelperTests 2024-01-15 17:04:11 +01:00
Stéphane Nicoll
4d885f9aad Polish 2024-01-15 16:45:53 +01:00
Stéphane Nicoll
0c42965fc3 Polish 2024-01-15 11:17:19 +01:00
Sam Brannen
4b0443090a Polish Javadoc for test annotations 2024-01-09 16:32:22 +01:00
Sébastien Deleuze
598c972a78 Update ContentRequestMatchers#multipartData Javadoc
This commit updates ContentRequestMatchers#multipartData
Javadoc to mention Tomcat fork of Commons FileUpload library
instead of the original variant.

It also adds a similar note to
ContentRequestMatchers#multipartDataContains.

Closes gh-31988
2024-01-09 14:12:09 +01:00
Stéphane Nicoll
1f2d29ee08 Polish 2024-01-08 17:12:33 +01:00
Stéphane Nicoll
2d3b02a89d Polish 2024-01-08 11:48:08 +01:00
Sam Brannen
085af10afd Polishing 2024-01-05 18:16:39 +01:00
Sam Brannen
580d9f81e2 Polishing 2024-01-05 17:06:32 +01:00
Sam Brannen
79b0d71514 Support the use of @⁠Resource in test classes in AOT mode
Closes gh-31733
2024-01-05 16:31:18 +01:00
Juergen Hoeller
07097976ef Polishing 2024-01-05 10:08:57 +01:00