Juergen Hoeller
f9307897b6
Polishing
...
(cherry picked from commit 2474c48749 )
2018-08-02 17:18:08 +02:00
Juergen Hoeller
8c1290084d
Polishing
2018-07-31 23:40:36 +02:00
Juergen Hoeller
fd75600c26
Polishing
2018-07-31 21:37:40 +02:00
Rossen Stoyanchev
2d83051ce1
bindToApplicatonContext uses WebSessionManager bean
...
Issue: SPR-17094
2018-07-26 16:05:33 -04:00
Rossen Stoyanchev
f9ff6d4192
Polish
2018-07-26 15:54:21 -04:00
Juergen Hoeller
93ef169c5c
Polishing
2018-07-25 14:40:31 +02:00
Rossen Stoyanchev
9458186e83
Polish DefaultUriBuilderFactory
2018-07-16 21:24:52 -04:00
Juergen Hoeller
ea534b6820
Polishing
2018-06-29 20:07:53 +02:00
Juergen Hoeller
a631af80c1
Polishing
...
(cherry picked from commit 40efcc9 )
2018-06-28 16:42:14 +02:00
Rossen Stoyanchev
9d36fd0b68
Respect async request timeout of -1 in MockMvc
...
When falling back on the timeout associated with the async request,
a value of -1 must be treated as: never time out.
Issue: SPR-16869
2018-05-24 12:36:47 -04:00
Sebastien Deleuze
4d69ec48b1
Add StatusResultMatchers.isEqualTo Kotlin extension
...
Issue: SPR-16429
2018-05-15 15:42:25 +02:00
Juergen Hoeller
a9548f93e4
Support for non-standard HTTP status in reactive ClientHttpResponse
...
Issue: SPR-16748
(cherry picked from commit a683472 )
2018-05-02 16:04:01 +02:00
Rossen Stoyanchev
f7376bdde3
Better assertion message in MockPart
...
Issue: SPR-16767
2018-04-25 10:00:18 -04:00
sdeleuze
91c8b62817
Make ResponseSpec.expectBody Kotlin extension usable
...
Prior to this commit, due to KT-5464 type inference issue there was not
proper way to provide body expectations with WebTestClient. This commit
provides a workaround by updating the existing Kotlin extension to
return a Kotlin compatible API.
Issue: SPR-15692
2018-04-17 14:58:12 +02:00
Sam Brannen
c3bc125093
Suppress warning in SpringFailOnTimeoutTests
2018-04-14 16:44:47 +02:00
Sam Brannen
02e09098e4
Expand scope of SpringFailOnTimeoutTests
...
Issue: SPR-16716
2018-04-12 11:00:45 +02:00
Igor Suhorukov
230c8f93e8
Throw exception from user code in SpringFailOnTimeout even if a timeout occurs
...
Issue: SPR-16717
2018-04-12 11:00:35 +02:00
Rossen Stoyanchev
7a896d7d80
TestDispatcherServlet unwraps to find mock request
...
Issue: SPR-16695
2018-04-06 11:04:29 -04:00
Juergen Hoeller
912c270f2b
Polishing
2018-03-31 17:49:21 +02:00
Sam Brannen
e5096be660
Polishing
2018-03-30 12:23:28 +02:00
Sam Brannen
f79562f8d1
Introduce tests for generics & @Nested test classes
2018-03-30 12:12:21 +02:00
Juergen Hoeller
d553ddc5b3
Nullability refinements (based on IntelliJ IDEA 2018.1 introspection)
...
Issue: SPR-15756
2018-03-29 23:50:17 +02:00
igor-suhorukov
c1ff97e2a8
Short-circuit logic should be used in boolean contexts
2018-03-29 23:33:22 +02:00
Sam Brannen
9244090ba0
Support DI of individual constructor args in @Nested tests
...
Prior to this commit it was impossible to have an individual
constructor argument in a @Nested (i.e., inner) test class injected via
@Autowired, @Qualifier, or @Value.
This is due to a bug in javac on JDK versions prior to 9, whereby
annotation lookups performed directly via the
java.lang.reflect.Parameter API fail for inner class constructors.
Specifically, the parameter annotations array in the compiled byte code
for the user's test class excludes an entry for the implicit enclosing
instance parameter for an inner class constructor.
This commit introduces a workaround in ParameterAutowireUtils for this
off-by-one error by transparently looking up annotations on the
preceding Parameter object (i.e., index - 1). In addition, this commit
relies on the change recently introduced in MethodParameter in order to
compensate for the same JDK bug (see SPR-16652).
Issue: SPR-16653
2018-03-29 17:47:45 +02:00
Rossen Stoyanchev
f9e6ea5482
MvcResult returns asyncResult after asyncDispatch
...
Issue: SPR-16648
2018-03-28 22:15:16 -04:00
igor-suhorukov
4aae6a6dda
Use Map.forEach instead of manual Map.Entry iteration wherever possible SPR-16646
2018-03-28 01:09:03 +02:00
Sam Brannen
75f70b269e
Introduce @Nested tests with constructor injection
...
This commit introduces @Nested tests to verify support for constructor
injection when using the SpringExtension.
One of the tests is disabled on Java 8 due to a bug in javac that was
first fixed in JDK 9.
See https://github.com/junit-team/junit5/issues/1345 for details.
2018-03-27 16:45:26 +02:00
Juergen Hoeller
f00afe3247
Use (Concurrent)Map.computeIfAbsent for lazy nested collection creation
2018-03-23 17:36:23 +01:00
Arjen Poutsma
c56317928f
Add formData() and multipartData() to ServerRequest
...
Issue: SPR-16551
2018-03-23 10:00:30 +01:00
Juergen Hoeller
c1405ef140
Polishing
2018-03-21 16:12:42 +01:00
Arjen Poutsma
b31d55dfce
Deprecated ClientRequest.method in favor of ClientRequest.create
...
The former method clashed with the ClientRequest.method() getter.
2018-03-16 17:27:29 +01:00
Rossen Stoyanchev
72bbb2619d
Commit actions are (properly) deferred
...
Issue: SPR-16597
2018-03-15 23:17:57 -04:00
Rossen Stoyanchev
541ee13934
Add bufferContent option to MockRestServiceServer
...
Issue: SPR-14694
2018-03-15 22:13:44 -04:00
Rossen Stoyanchev
f7e75a5b82
Polish MockRestServiceServer client tests
2018-03-15 22:13:43 -04:00
Sam Brannen
5f4d5f17f7
Polishing
2018-03-13 16:48:52 +01:00
Sam Brannen
2c2ce55f47
Support target type in JsonPath assertions for MockMvc results
...
This commit picks up where SPR-14498 left off by adding support for an
explicit target type when using JsonPath to perform an assertion against
the response content using a Hamcrest Matcher.
Specifically, there is a new overloaded value(Matcher<T>, Class<T>)
method in JsonPathResultMatchers for use with Hamcrest matchers where
the target type (i.e., Class<T>) can be specified.
Issue: SPR-16587
2018-03-13 15:55:39 +01:00
Bronwyn Perry-Huston
d64f2eb038
Add JSON matcher to assert on request body
...
Support asserting JSON regardless of order and formatting.
Based on same JsonExpectationHelper used in ContentResultMatchers.
Issue: SPR-13919
2018-03-13 12:27:05 +01:00
Sam Brannen
1fa1f2b58a
Delete unused import
2018-03-10 16:56:33 +01:00
Rossen Stoyanchev
3653a37e27
Polish tests
2018-03-09 21:16:18 -05:00
Sam Brannen
107f8bb5fd
Polishing
2018-03-09 18:19:30 +01:00
Sam Brannen
00fea23e6b
Introduce test for WebTestClient with RegEx-based JsonPath
2018-03-09 14:51:37 +01:00
Juergen Hoeller
139dc1d373
Polishing (collapsed if checks, consistent downcasts, refined javadoc)
2018-03-08 18:11:57 +01:00
igor-suhorukov
0f7485b01d
Polish: reorder the modifiers to comply with the Java Language Specification.
2018-03-08 17:57:47 +01:00
Sam Brannen
b14301bfba
Allow TestContextManager to be compiled in Eclipse again
2018-03-07 17:44:24 +01:00
Sam Brannen
2454b31b30
Polish MockRestRequestMatchers[Tests]
2018-03-07 14:20:57 +01:00
Sam Brannen
f932796201
Polishing
2018-03-07 13:22:36 +01:00
Sam Brannen
fef0c7b151
Throw AssertionError instead of IAE in MockRestRequestMatchers
2018-03-07 13:22:21 +01:00
Yannik Hampe
4094879daf
Make MockRestRequestMatchers independent of JUnit ( #1720 )
...
MockRestRequestMatchers was using org.junit.Assert.assertNotNull
and thus could not be used in projects that use e.g. TestNG instead
of JUnit 4.
2018-03-07 13:07:32 +01:00
Juergen Hoeller
a0cc80063d
Concurrency and exception message refinements for test transactions
2018-03-05 13:00:35 +01:00
igor-suhorukov
ed936cbd89
Polish: Overriding methods should do more than simply call the same method in the super class
2018-03-02 00:06:27 +01:00