Juergen Hoeller
0941081b0a
Upgrade to HSQLDB 2.4.1, Derby 10.14.2.0, HtmlUnit 2.31, Selenium 3.12
2018-06-06 21:24:53 +02:00
Rossen Stoyanchev
72b1d4c648
Remove explicit references to Reactor Netty version
...
...now that 0.8 is also listed in the Reactor bom.
Issue: SPR-16387
2018-06-06 14:35:54 -04:00
Rossen Stoyanchev
124d4c833c
Support for Servlet request params with HTTP DELETE
...
This commit adds FormContentFilter, which is the same as the
HttpPutFormContentFilter but also supports DELETE.
The HttpPutFormContentFilter is now deprecated.
Issue: SPR-16874
2018-06-04 15:48:47 -04:00
Rossen Stoyanchev
a3216432b5
Polish
...
Issue: SPR-16387
2018-05-31 15:38:30 -04:00
Violeta Georgieva
ffbc75ae47
Upgrade to Reactor Netty 0.8
...
Issue: SPR-16387
2018-05-31 15:37:39 -04:00
Juergen Hoeller
8593fec22c
Avoid ConstantConditions warnings suppression (plus related polishing)
...
Issue: SPR-15756
2018-05-29 21:47:10 +02:00
Rossen Stoyanchev
2acf91a438
Polish
2018-05-26 09:24:23 -04:00
Juergen Hoeller
836a09d5c0
Upgrade to Woodstox 5.1, XMLUnit 2.6, Gson 2.8.5
2018-05-25 00:18:06 +02:00
Rossen Stoyanchev
2a993bf9ff
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:33:19 -04:00
Juergen Hoeller
285eb94a03
Upgrade to Hibernate Validator 6.0.10
2018-05-18 22:22:12 +02:00
Sebastien Deleuze
265960f09c
Add StatusResultMatchers.isEqualTo Kotlin extension
...
Issue: SPR-16429
2018-05-15 15:37:47 +02:00
Rossen Stoyanchev
15182b29a4
Add MockWebSession for use with MockServerWebExchange
...
Issue: SPR-16772
2018-05-11 10:53:28 -04:00
Rossen Stoyanchev
4da43de7e1
Remove individual detection of forwarded headers
...
This commit removes all places where forwarded headers are checked
implicitly, on an ad-hoc basis.
ForwardedHeaderFilter is expected to be used instead providing
centralized control over using or discarding such headers.
Issue: SPR-16668
2018-05-11 09:31:39 -04:00
Rossen Stoyanchev
d3f3b41f52
MockHttpServletResponse writer sets committed flag
...
Issue: SPR-16683
2018-05-10 16:22:54 -04:00
Rossen Stoyanchev
eef592d901
Add builder to MockServerWebExchange
...
Issue: SPR-16772
2018-05-10 15:16:13 -04:00
Sam Brannen
7444a62f98
Test Spring-managed JUnit Jupiter extension
2018-05-09 13:34:30 +02:00
Juergen Hoeller
53aa9cc4cd
Upgrade to Servlet API 4.0.1 (aligned with Tomcat 9 and Undertow 2)
...
Issue: SPR-16470
2018-05-07 14:17:28 +02:00
Arjen Poutsma
22edab852d
Provide simple way to create ServerRequest
...
This commit introduces support for creating a new `ServerRequest` from
an existing instance. This is especially useful when filtering requests
in a HandlerFilterFunction.
Issue: SPR-16707
2018-05-02 10:54:00 +02:00
Sam Brannen
6fa1095e35
Upgrade to JUnit Jupiter 5.2
2018-04-30 11:21:26 +01:00
Juergen Hoeller
d979bbad2d
Expose AspectJ 1.9.1 in Maven POMs
...
Includes upgrade to Hibernate ORM 5.2.17 for integration tests.
Issue: SPR-16780
2018-04-27 19:33:50 +02:00
Juergen Hoeller
a683472daa
Support for non-standard HTTP status in reactive ClientHttpResponse
...
Issue: SPR-16748
2018-04-27 18:25:11 +02:00
Rossen Stoyanchev
9bc4e70e93
Better assertion message in MockPart
...
Issue: SPR-16767
2018-04-25 09:59:06 -04:00
Sam Brannen
ae3fd49ebb
Introduce non-transactional test for TestNG support
2018-04-23 16:18:02 +02:00
sdeleuze
568a0b5b79
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 15:00:04 +02:00
Sam Brannen
c6ed41ec47
Suppress warning in SpringFailOnTimeoutTests
2018-04-14 15:02:57 +02:00
Sam Brannen
8317f12a9b
Move SpringFailOnTimeoutTests to 'statements' package
2018-04-12 11:14:08 +02:00
Sam Brannen
4f3a7dd9b4
Expand scope of SpringFailOnTimeoutTests
...
Issue: SPR-16716
2018-04-12 10:56:40 +02:00
Igor Suhorukov
3c34a1cb8c
Throw exception from user code in SpringFailOnTimeout even if a timeout occurs
...
Issue: SPR-16717
2018-04-12 10:37:13 +02:00
Sam Brannen
2523c3ab77
Clean up deprecation warning in spring-test
2018-04-11 12:03:55 +02:00
Arjen Poutsma
7e2726f400
Add remoteAddress() to ServerRequest
...
Issue: SPR-16681
2018-04-10 11:13:45 +02:00
Juergen Hoeller
9fbab791a0
Upgrade to TestNG 6.14.3, JUnit 5.1.1, Mockito 2.18
2018-04-10 00:12:28 +02:00
Rossen Stoyanchev
313308208e
TestDispatcherServlet unwraps to find mock request
...
Issue: SPR-16695
2018-04-06 11:02:46 -04:00
Sam Brannen
56774baa2a
Use Gradle 4.6's built-in support for the JUnit Platform
...
Gradle 4.6 provides built-in support for the JUnit Platform within the
standard `test` task.
This commit configures a custom `testJUnitJupiter` test task for
executing JUnit Jupiter tests directly on the JUnit Platform instead of
indirectly on JUnit 4 via @RunWith(JUnitPlatform.class).
This switch provides for better integration with Gradle's test reporting
and paves the way for a possible transition to the JUnit Platform in the
future.
Issue: SPR-16672
2018-04-04 15:43:44 +02:00
Sam Brannen
71cacff8c2
Upgrade to JUnit Jupiter 5.1
...
Issue: SPR-16408
2018-04-04 12:29:26 +02:00
Juergen Hoeller
28ea718d2d
Build setup allows for JDK 10 as source/test target compatibility
...
Includes upgrade to Groovy 2.4.15 and HtmlUnit 2.30.
Issue: SPR-16390
2018-03-31 23:17:31 +02: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
Juergen Hoeller
9a27bc9b3e
Upgrade to Jackson 2.9.5 and Hibernate Validator 6.0.9
2018-03-27 17:33:34 +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
c441d60d1d
Upgrade to Kotlin 1.2.31 and RxJava 2.1.12
...
Includes H2 1.4.197 and Selenium HtmlUnit Driver 2.29.3 as well.
2018-03-24 16:48:53 +01:00
Juergen Hoeller
b2f900e518
Upgrade to Hibernate ORM 5.2.16 and 5.1.13
2018-03-23 17:36:55 +01: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
Juergen Hoeller
99bb97388e
Upgrade to Tomcat 8.5.29 and Selenium 3.11
2018-03-12 20:42:11 +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
2a3f90dc7b
Upgrade to Hibernate ORM 5.2.15 and Hibernate Validator 6.0.8
2018-03-09 09:40:12 +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
4f8c4546f1
Upgrade to SnakeYAML 1.20 and Selenium 3.10
2018-03-05 15:25:01 +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
Juergen Hoeller
bfddbbe731
Polishing
2018-03-01 01:39:06 +01:00
igor-suhorukov
8080f56db8
Polish: "@Override" should be used on overriding and implementing methods
2018-03-01 00:15:18 +01:00
Juergen Hoeller
33cd160861
Upgrade to Reactor Bismuth SR7, Hibernate ORM 5.2.14, Common Annotations 1.3.2
2018-02-28 14:01:04 +01:00
Rossen Stoyanchev
e12fcca1e3
Fix failing test
2018-02-26 20:35:17 -05:00
Juergen Hoeller
9e55422334
Polishing
2018-02-25 15:38:32 +01:00
Juergen Hoeller
01d9475bcc
Turn registered controller classes into controller instances on the fly
...
Issue: SPR-16520
2018-02-25 14:29:44 +01:00
igor-suhorukov
c782075a13
Polish: Array designators "[]" should be on the type, not the variable
2018-02-25 13:14:20 +01:00
Juergen Hoeller
3531c104b0
Prefer Collections.addAll call with array over Set.addAll(Arrays.asList)
2018-02-25 00:21:39 +01:00
Juergen Hoeller
a5cbf5fe24
Consistent use of Collection.toArray with zero-sized array argument
...
Includes consistent use of ClassUtils.toClassArray (as non-null variant)
Issue: SPR-16523
2018-02-22 11:29:46 +01:00
Rossen Stoyanchev
bb8cddda23
Assert instances (vs classes) in MockMvc/WebTestClient
...
Issue: SPR-16520
2018-02-21 14:01:53 -05:00
Juergen Hoeller
0de36d2883
Consistent HttpMethod identity comparisons
2018-02-18 22:01:22 +01:00
Juergen Hoeller
d7cab23e6d
Consistent use of StringUtils.toStringArray
...
(cherry picked from commit 6d11b40
)
2018-02-16 20:49:17 +01:00
Juergen Hoeller
8d3264f680
Prefer List.sort(Comparator) over Collections.sort(List, Comparator)
2018-02-16 10:23:18 +01:00
igor-suhorukov
2be4985b8f
Polish: anonymous inner classes containing only one method should become lambdas,
...
use getOrDefault instead of ternary operator
2018-02-16 09:38:19 +01:00
Juergen Hoeller
3b810f3544
Consistent Class array vs vararg declarations (and related polishing)
2018-02-14 14:44:00 +01:00
igor-suhorukov
45e520ed86
Polish: remove unused private fields, remove empty operator
2018-02-13 23:00:18 +01:00
Sam Brannen
c11a963b1e
Remove dependency on apiguardian-api in spring-test
...
The apiguardian-api dependency is once again a mandatory transitive
dependency of JUnit 5 since JUnit Jupiter 5.0.3.
2018-02-13 13:04:48 +01:00
Juergen Hoeller
c9aede3727
Upgrade to Tomcat 8.5.28 (and Selenium HtmlUnit Driver 2.29.2)
2018-02-13 12:44:34 +01:00
Juergen Hoeller
a5a069c5b1
Upgrade to JavaMail 1.6.1
2018-02-13 00:02:43 +01:00
Juergen Hoeller
91965500cb
Upgrade to TestNG 6.14.2 and Selenium 3.9.1
2018-02-10 17:48:58 +01:00
igor-suhorukov
0ee505b73e
Polish: assertion arguments should be passed in the correct order,
...
use assertNull instead of assertEquals(null, value),
declare delta as double value in assertEquals
2018-02-10 17:17:28 +01:00
Juergen Hoeller
39201adca4
Consistent handling of InterruptedException
...
Issue: SPR-16479
2018-02-10 13:03:33 +01:00
igor-suhorukov
9a6fbf59c5
Polish: follow name convention - make immutable fields final
2018-02-10 12:09:19 +01:00
Stephane Nicoll
991eb4858e
Update copyright header
2018-02-09 10:16:58 +01:00
igor-suhorukov
e381514b07
Collection.isEmpty() should be used to test for emptiness
...
Closes gh-1670
2018-02-09 10:11:44 +01:00
Juergen Hoeller
4318710b9b
Upgrade to Hibernate 5.2.13
2018-02-07 14:14:22 +01:00
Rossen Stoyanchev
1653a32a04
Stabilize Flux.interval emissions in integration tests
...
After this commit the use of interval in tests is combined with
take(n).onBackpressureBuffer(n) to ensure emissions don't fail if the
fixed rate is exceeded (e.g. on slow CI server).
Tests that verify N number of items followed by verifyOnComplete()
should set the number of emissions to N.
Tests that verify N number of items followed by thenCancel() should
set the number of buffered to an arbitrary number greater than N.
2018-02-06 11:01:19 -05:00