Commit Graph

1566 Commits

Author SHA1 Message Date
Rossen Stoyanchev 69eba32284 Improved Part support in MultipartBodyBuilder
1. Add contentType and filename options to PartBuilder.

2. Revert recently committed #44659f since asyncPart can't properly
support Publisher of Part (only Mono, can't support filename), and
replace that with support for Part in the regular part method.

Closes gh-23083
2019-06-04 17:21:39 -04:00
Sam Brannen 3a8388ec8d Merge branch '5.1.x' 2019-06-04 12:01:58 +03:00
Jay Bryant 68333171b6 Reintroduce author list and copyright notice
Closes gh-23049
2019-06-04 11:54:58 +03:00
Sebastien Deleuze e0bb712bfc Update Kotlin documentation 2019-05-31 14:15:44 +02:00
zyan f492e37370 Fix typo
provices -> provides

See gh-23046
2019-05-28 16:00:35 +02:00
Sam Brannen 141ef9082f Clean up Mockito usage
This commit migrates to the MockitoJUnitRunner where sensible, which
will later allow for an easier migration to Mockito's extension for
JUnit Jupiter.

In addition, this commit deletes unnecessary stubbing for various mocks
and polishes test fixture setup in various test classes.
2019-05-28 13:59:43 +02:00
Sebastien Deleuze 9905200f69 Merge branch '5.1.x' 2019-05-28 08:01:23 +02:00
Artsiom Chapialiou 0267bcb404 Fix broken asciidoc link to declarative transaction management
Closes gh-23041
2019-05-28 08:00:00 +02:00
Sam Brannen 4f4427f550 Migrate TestNG assertions to AssertJ
Migrate all existing TestNG based assertions to AssertJ and add
Checkstyle rules to ensure they don't return.

See gh-23022
2019-05-26 18:29:39 +02:00
Sam Brannen 5a1217cafe Migrate JUnit Jupiter assertions to AssertJ
Migrate all existing JUnit Jupiter based assertions to AssertJ and add
Checkstyle rules to ensure they don't return.

See gh-23022
2019-05-24 18:50:01 +02:00
Diego Castro 2f8aa368fe Fix code example for validation on functional endpoints
Closes gh-23020
2019-05-24 09:41:17 +02:00
Phillip Webb 9d74da006c Migrate JUnit 4 assertions to AssertJ
Migrate all existing JUnit 4 `assert...` based assertions to AssertJ
and add a checkstyle rule to ensure they don't return.

See gh-23022
2019-05-23 15:52:49 -07:00
Phillip Webb 95a9d46a87 Migrate Hamcrest assertions to AssertJ
Migrate all existing `assertThat(..., Matcher)` assertions to AssertJ
and add checkstyle rules to ensure they don't return.

See gh-23022
2019-05-23 15:49:59 -07:00
Phillip Webb 02850f357f Migrate exception checking tests to use AssertJ
Migrate tests that use `@Test(expectedException=...)` or
`try...fail...catch` to use AssertJ's `assertThatException`
instead.
2019-05-20 10:47:53 -07:00
Rossen Stoyanchev 013249757a Merge branch '5.1.x' 2019-05-15 16:44:05 -04:00
Rossen Stoyanchev e0b9ed6d72 Fix typo in reference
Closes gh-22975
2019-05-15 16:13:02 -04:00
Juergen Hoeller e0654a5b3d Merge branch '5.1.x' 2019-05-13 19:22:07 +02:00
Juergen Hoeller d3110c452e SpEL documentation refinements 2019-05-13 19:15:45 +02:00
Sam Brannen 73dbd06361 Enforces static imports for JUnit 4 assertions and assumptions
This commit configures Checkstyle to enforces static imports for JUnit 4
assertions and assumptions.

See gh-22932
2019-05-12 15:13:07 +02:00
Sam Brannen 724c805211 Discontinue use of JUnit 3 APIs
This commit also ensures that the JSR-330 TCK is executed with the
normal build by adhering to naming conventions for test classes.

See gh-22894
2019-05-12 14:46:55 +02:00
Sam Brannen 5685e9dfa3 Add Checkstyle rules for deprecated JUnit APIs
This commit adds Checkstyle rules to disallow imports of the following.

- junit.framework.*
- org.junit.Assert.assertThat
- org.junit.Assume.assumeThat

See gh-22894
2019-05-12 14:46:55 +02:00
Stephane Nicoll 6d69a4e03a Merge branch '5.1.x' 2019-05-10 09:57:25 +02:00
Andrew McCallum 9294b1d7eb Fix typo
Closes gh-22938
2019-05-10 09:56:47 +02:00
Sam Brannen 1be29d5933 Document automatic constructor injection in JUnit Jupiter
Closes gh-22928
2019-05-09 16:16:32 +02:00
Juergen Hoeller 0b50d1eff3 Merge branch '5.1.x' 2019-05-09 14:29:37 +02:00
Denis Zavedeev 484ec64305 Minor integration doc refinements 2019-05-09 14:27:22 +02:00
Denis Zavedeev c80028b71e Fix trivial errors in `integration.adoc` 2019-05-09 13:50:26 +02:00
Phillip Webb 798b51f4a3 Migrate to BDD Mockito
Migrate all tests to consistently use BDD Mockito. Also add
checksyle rule to enforce going forwards.
2019-05-08 13:46:13 -07:00
Phillip Webb 816bbee8de Remove '.*' imports from tests
Organize test imports to expand all '.*' static imports into
fully qualified imports.

This update will allow us to use additional checkstyle rules in
the future, and will also help if we migrate fully to AssertJ.
2019-05-08 09:55:09 -07:00
Phillip Webb 1b985fb3da Update static import limit in eclipse prefs
Update eclipse preferences so that static imports no longer use
`.*`.
2019-05-08 09:53:01 -07:00
Phil Webb d7320de871 Migrate away from ExpectedException (#22922)
* Add limited checkstyles to test code

Add a limited set of checkstyle rules to the test codebase to improve
code consistency.

* Fix checksyle violations in test code

* Organize imports to fix checkstyle for test code

* Migrate to assertThatExceptionOfType

Migrate aware from ExpectedException rules to AssertJ exception
assertions. Also include a checkstyle rules to ensure that the
the ExpectedException is not accidentally used in the future.

See gh-22894
2019-05-08 16:25:52 +02:00
Phillip Webb f86affe404 Extract integration test classes from package-info
Extract the inner classes from package-info into their own files to
prevent local build problems and to make them easier to find.
2019-05-07 23:12:42 +02:00
Juergen Hoeller e3fa4e1350 Merge branch '5.1.x' 2019-05-07 14:24:28 +02:00
Juergen Hoeller ecc165a94f Consistent spelling on index page 2019-05-07 13:46:27 +02:00
Nicofisi 0e980324e6 Add a space in the documentation index file 2019-05-07 13:29:59 +02:00
Sam Brannen c79fdfb668 Use assertThat from Hamcrest instead of JUnit 4
org.junit.Assert.assertThat() is deprecated as of JUnit 4.13.

See gh-22894
2019-05-05 18:09:11 +02:00
Sebastien Deleuze 89454e69c3 Deprecate MediaType.APPLICATION_JSON_UTF8
This commit deprecates MediaType.APPLICATION_JSON_UTF8 and
MediaType.APPLICATION_PROBLEM_JSON_UTF8 in favor of
MediaType.APPLICATION_JSON and MediaType.APPLICATION_PROBLEM_JSON since
UTF-8 encoding is now handled correctly by most browsers
(related bug has been fixed in Chrome since September 2017).

MediaType.APPLICATION_JSON is now used as the default JSON content type.

Closes gh-22788
2019-04-30 16:11:50 +02:00
Sebastien Deleuze 2e6059f6b0 Add coroutines support to RSocket @MessageMapping
Closes gh-22780
2019-04-30 15:48:18 +02:00
Sam Brannen 3d0ec509ab Document mock JNDI support deprecation in the Reference Manual
See gh-22779
2019-04-11 16:46:50 +02:00
Sebastien Deleuze 849a848f23 Polishing 2019-04-10 00:32:20 +02:00
Sebastien Deleuze ff1f368751 Improve Kotlin documentation 2019-04-09 23:54:22 +02:00
Sebastien Deleuze cd0b517abf Improve Kotlin documentation 2019-04-09 12:28:00 +02:00
Juergen Hoeller 43cb1af26a Polishing 2019-04-08 15:33:26 +02:00
Sam Brannen 353e092bf6 Register EventPublishingTestExecutionListener by default (round 2)
This commit registers the EventPublishingTestExecutionListener as a
default TestExecutionListener with an order of 10,000. This registers
the EventPublishingTestExecutionListener as the last listener provided
by the Spring Framework.

With EventPublishingTestExecutionListener registered with an order of
10,000, it is effectively wrapped by all other Spring listeners,
including support for @DirtiesContext and test-managed transactions.

Furthermore, this commit revises the implementation of
EventPublishingTestExecutionListener to take advantage of the new
TestContext#hasApplicationContext() support which allows the
EventPublishingTestExecutionListener to publish events only if the
test's ApplicationContext is currently available. This avoids
undesirable side-effects such as eager loading of the
ApplicationContext before it is needed or re-loading of the
ApplicationContext after it has been intentionally closed.

Closes gh-18490
2019-04-06 16:39:26 +02:00
Tadaya Tsuyukubo dacda5859a Fix broken asciidoc heading 2019-04-06 11:02:45 +02:00
Sam Brannen e4525cf4c1 Modify ByteArrayEncoder so that it works in Eclipse IDE 2019-04-05 19:55:22 +02:00
Sam Brannen f7a5b3013e Revert "Register EventPublishingTestExecutionListener by default"
This reverts commit 13543f5e0f.
2019-04-04 19:10:58 +02:00
Sam Brannen a5e297a161 Polishing 2019-04-04 18:41:57 +02:00
Juergen Hoeller 1741b6dcd9 Merge branch '5.1.x' 2019-04-04 16:12:07 +02:00
Juergen Hoeller 97b83a3e4a Revised documentation on constructor autowiring semantics
Closes gh-22735
2019-04-04 16:09:51 +02:00