Commit Graph

1555 Commits

Author SHA1 Message Date
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
Sam Brannen
13543f5e0f Register EventPublishingTestExecutionListener by default
Closes gh-18490
2019-04-03 18:31:16 +02:00
Sam Brannen
d6173512fe Document test execution event support in the Reference Manual
Closes gh-18490
2019-04-03 18:18:39 +02:00
Stephane Nicoll
8714710170 Merge branch '5.1.x' 2019-04-01 14:02:23 +02:00
Stephane Nicoll
de2a01eee4 Polish
Closes gh-22717
2019-04-01 14:01:41 +02:00
Juergen Hoeller
76e5a2a53b Remove superfluous empty lines 2019-03-30 00:26:58 +01:00
Juergen Hoeller
2e832c03ae Merge branch '5.1.x' 2019-03-30 00:25:10 +01:00
Juergen Hoeller
c6619006eb Polishing 2019-03-30 00:20:32 +01:00
Juergen Hoeller
3ba0a79a57 Upgrade to OpenPDF 1.2.12 2019-03-30 00:13:29 +01:00
Juergen Hoeller
462d047f72 Typo fixes and formatting 2019-03-29 23:44:00 +01:00
Stephane Nicoll
2156a1bbd5 Polish contribution
Closes gh-22709
2019-03-29 22:40:40 +01:00
arman simonyan
257772c61e Polish
See gh-22709
2019-03-29 22:40:04 +01:00