Commit Graph

739 Commits

Author SHA1 Message Date
Juergen Hoeller
5f167fd7f8 Polishing 2017-09-27 01:46:16 +02:00
Juergen Hoeller
9fdc4404a5 Backport selected refinements from the nullability efforts
Issue: SPR-15656
2017-09-27 00:10:04 +02:00
Juergen Hoeller
87df393f91 MockPart backport
Issue: SPR-15854
2017-09-27 00:09:09 +02:00
Juergen Hoeller
fa2c377405 Downgrade to AspectJ 1.8.9 and merge EhCache 3 tests into spring-context-support
Includes latest applicable updates (Jackson 2.8.10, OkHttp 3.8.1, Undertow 1.3.31, Netty 4.1.15)

Issue: SPR-15836
Issue: SPR-15880
2017-09-08 19:41:27 +02:00
Juergen Hoeller
55fa5f2b65 ReflectionTestUtils does not require spring-aop on the classpath
Issue: SPR-15757
(cherry picked from commit dd43b6a)
2017-07-12 22:59:12 +02:00
Rossen Stoyanchev
8d743181da Fix MockMvc + HttpPutFormContentFilter issue
Issue: SPR-15753
2017-07-11 12:03:07 +02:00
Juergen Hoeller
a17255a2e3 SimpleRequestExpectationManager properly handles sequential requests with different count
Issue: SPR-15672
(cherry picked from commit efb735a)
2017-06-30 16:06:39 +02:00
Juergen Hoeller
50235be746 Avoid JDK 7+ AssertionError constructor in 4.3.x line 2017-05-04 14:14:56 +02:00
Juergen Hoeller
9b647021f7 Allow for HttpOnly cookie result matcher
Issue: SPR-15488
(cherry picked from commit 04f0f13)
2017-05-04 14:00:37 +02:00
Juergen Hoeller
38089d8e66 Correct attributeHasNoErrors message in ModelResultMatchers
Includes consistent name quoting.

Issue: SPR-15487
(cherry picked from commit 0479dc9)
2017-05-04 14:00:15 +02:00
Juergen Hoeller
8b054840fc Minimize reflective interaction with annotation instances during retrieval
Issue: SPR-15387
(cherry picked from commit 3037277)
2017-04-13 15:53:46 +02:00
Connor Lin
8289bf0aff Remove a redundant word
Closes gh-1361
2017-03-27 10:10:14 +02:00
Juergen Hoeller
21ac764e5c Polishing 2017-03-24 13:41:34 +01:00
Juergen Hoeller
22ddb35258 HeaderValueHolder.toString() exposes underlying list of header values
Issue: SPR-15375
(cherry picked from commit 15bff8f)
2017-03-24 13:40:43 +01:00
Juergen Hoeller
98dbc17591 Polishing 2017-03-07 10:33:48 +01:00
Juergen Hoeller
9de97614a0 Adapt to HtmlUnit 2.25 getCharset() return type at runtime
Issue: SPR-15319
2017-03-07 10:33:26 +01:00
Rossen Stoyanchev
e9de3bb85b Fix wrong access modifier in MockMvc standalone setup
Issue: SPR-15248
2017-02-23 16:12:14 -05:00
Juergen Hoeller
b0ef80c3ff Polishing 2017-02-16 14:20:40 +01:00
Juergen Hoeller
c3cc42d4d3 Avoid double encoding of URIs
Issue: SPR-15254
2017-02-16 14:20:15 +01:00
Juergen Hoeller
eff285eb3b MockHttpServletRequest exposes "HTTP/1.1" as default protocol
Issue: SPR-15232
(cherry picked from commit ed85337)
2017-02-10 11:46:42 +01:00
Stephane Nicoll
e80c251c7a Update copyright header 2017-02-09 16:07:14 +01:00
Masayasu Yamamoto
56abc4a429 Fix Javadoc in ContentResultMatchers
Closes gh-1322
2017-02-09 16:07:05 +01:00
Juergen Hoeller
d4010573af MockHttpServletRequest returns empty BufferedReader in case of no content
Issue: SPR-15215
(cherry picked from commit 0da964f)
2017-02-02 21:16:44 +01:00
Juergen Hoeller
28849e0987 Revisit Assert to avoid single-arg assert methods (with refined messages)
Issue: SPR-15196
(cherry picked from commit 1b2dc36)
2017-01-31 10:28:46 +01:00
Rossen Stoyanchev
c8b0ff2fca Add ExpectedCount#never()
Issue: SPR-15168
2017-01-20 17:11:09 -05:00
Rossen Stoyanchev
fcead670f0 Add locking to AbstractRequestExpectationManager
This commit ensures that verifying a request, which includes finding
and updating expectations, is done synchronously to avoid concurrent
modification exceptions.

Technically SimpleRequestExpectationManager is not even expected to see
concurrent requests by definition but with
UnorderedRequestExpectationManager it can happen.

Issue: SPR-15029
2017-01-17 16:48:26 -05:00
Vedran Pavić
d1c0ea7d74 Set MockSessionCookieConfig#maxAge default to -1
Issue: SPR-15142
(cherry picked from 83beb9d57d)
2017-01-16 23:07:26 +01:00
Juergen Hoeller
cce84711c6 MockHttpServletRequestBuilder reliably detects form body content type again
Issue: SPR-15116
(cherry picked from commit e88e8f1)
2017-01-16 22:43:01 +01:00
Juergen Hoeller
c5500b2332 MockHttpServletRequestBuilder supports multiple locales
Includes revised content type handling.

Issue: SPR-15116
(cherry picked from commit 02d727f)
2017-01-12 22:50:50 +01:00
Rossen Stoyanchev
b14d189db9 MockRestRequestMatchers can match query params
Issue: SPR-14995
2016-12-13 16:07:19 -05:00
Juergen Hoeller
0028b29760 Polishing 2016-12-01 19:09:26 +01:00
Juergen Hoeller
2b0293578f Consistent use of "URI variables" terminology
Issue: SPR-14969
(cherry picked from commit 7a8ec4f)
2016-12-01 14:12:07 +01:00
Rossen Stoyanchev
872d6ef55a HtmlUnitRequestBuilder detects form encoding type
Issue: SPR-14916
2016-11-28 18:08:44 -05:00
Juergen Hoeller
7e7504f5ea Polishing 2016-11-03 23:20:33 +01:00
Stephane Nicoll
1e3012cb49 Allow to customize TestDispatcherServlet
This commit introduces the `DispatcherServletCustomizer` callback
interface that can be used to customize the `DispatcherServlet` that a
`MockMvc` is using.

Previously, only the `dispatchOptions` flag can be customized. This
commit allows to customize any property of `DispatcherServlet` before it
is initialized.

Issue: SPR-14277
2016-10-29 11:09:48 +02:00
Juergen Hoeller
9de28d640e Polishing
(cherry picked from commit 3726c6f)
2016-10-21 12:59:59 +02:00
Juergen Hoeller
37670924f6 Polishing 2016-08-31 01:53:03 +02:00
Juergen Hoeller
d8f7347000 Consistent comma splitting without regex overhead
Issue: SPR-14635
(cherry picked from commit 03609c1)
2016-08-31 00:44:52 +02:00
Juergen Hoeller
430180aa96 Polishing 2016-08-26 18:33:13 +02:00
Rossen Stoyanchev
d09b0fe83a Support target type in JsonPath assertions
This change adds support for a target type in JsonPath assertions in
Spring MVC Test.

The existing assertValue(String expression, Object expectedValue)
transparently falls back on using an alternative JsonPath API that
allows specifying the target type to coerce to.

There is also a new overloaded method
assertValue(String expression, Matcher<T> matcher, Class<T> targetType)
for use with Hamcrest matchers where the target type can be specified.

Issue: SPR-14498
(cherry picked from commit 7fdb892)
2016-08-26 17:28:37 +02:00
Juergen Hoeller
2a82b8fed9 Consistent use of Charset.forName over JDK 7 StandardCharsets in 4.x line 2016-08-26 13:11:39 +02:00
Rob Winch
43faabd4cc Fix HtmlUnitRequestBuilder merge
Previously invoking HtmlUnitRequestBuilder merge caused the pathInfo of
the parent to be corrupted. This could additional invocations with the
same parent.

This fix ensures that the parent is no longer directly used. Instead,
we create a copy of the parent by merging the parent that was passed in
with the copy.

Fixes SPR-14584
2016-08-12 20:49:48 -05:00
Juergen Hoeller
79a56967a1 PersistenceAnnotationBeanPostProcessor obtains default EntityManagerFactory via getBean(Class) algorithm
Issue: SPR-7549
(cherry picked from commit 6157fad)
2016-08-11 23:25:35 +02:00
Juergen Hoeller
0bc0453700 Polishing 2016-08-10 16:59:22 +02:00
Juergen Hoeller
35e247aa26 Polishing 2016-08-10 16:21:35 +02:00
Juergen Hoeller
67ba187b6f Polishing
(cherry picked from commit 59a24b4)
2016-08-10 14:57:50 +02:00
Juergen Hoeller
67f0b1986c Consistent spelling for StandaloneMockMvcBuilder's addPlaceholderValue
(cherry picked from commit a4b6682)
2016-08-10 14:57:43 +02:00
Juergen Hoeller
aade2d1ec9 Polishing
(cherry picked from commit 9475c06)
2016-08-09 12:37:07 +02:00
Juergen Hoeller
4627545a3b Polishing
(cherry picked from commit eae079a)
2016-08-09 11:03:51 +02:00
Juergen Hoeller
e2ba7c9b8c MockClientHttpResponse closes body stream on close()
Issue: SPR-14563
(cherry picked from commit 47e9360)
2016-08-09 11:03:46 +02:00