Skip to content

Add AssertJ for use in our own tests #22561

Closed
@philwebb

Description

@philwebb

AssertJ provides a very nice fluent assertions style that in my opinion is easier to read and more consistent than Hamcrest. I'd like to add it as a test dependency and make use of it when testing the new MergedAnnotations API. Using AssertJ assertThatExceptionOfType... calls instead of @Rule ExpectedException will also help if we decide to migrate our tests to JUnit5.

Spring Boot tests have been written exclusively with AssertJ for some time now.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions