Commit Graph

6 Commits

Author SHA1 Message Date
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 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
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
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
Sam Brannen 3967082c77 Upgrade to latest Checkstyle DTD
See http://checkstyle.sourceforge.net/config.html#Configuration_XML_Structure
2019-03-15 16:32:20 +01:00
Phillip Webb 032096d699 Add checkstyle to build
Add checkstyle to the build to enforce Spring Framework coding
conventions. Rule suppressions are used for several classes where
relaxing the rules makes more sense than fixing them.

Issue: SPR-16968
2018-06-28 10:28:44 +02:00