Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add AssertJ for use in our own tests #22561

Closed
Tracked by #22560
philwebb opened this issue Mar 11, 2019 · 2 comments
Closed
Tracked by #22560

Add AssertJ for use in our own tests #22561

philwebb opened this issue Mar 11, 2019 · 2 comments
Assignees
Labels
type: task A general task
Milestone

Comments

@philwebb
Copy link
Member

philwebb commented Mar 11, 2019

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.

@philwebb philwebb self-assigned this Mar 11, 2019
@philwebb philwebb added the type: task A general task label Mar 11, 2019
@sbrannen
Copy link
Member

I'm totally in favor of using AssertJ in our own test suite. I miss it each time I write/update a test.

@sbrannen sbrannen added this to the 5.2 M1 milestone Mar 12, 2019
snicoll pushed a commit to snicoll/spring-framework that referenced this issue Mar 13, 2019
Add AssertJ as a test scope dependency for all sub-projects.

Closes spring-projectsgh-22561
philwebb added a commit to philwebb/spring-framework that referenced this issue Mar 14, 2019
Add AssertJ as a test scope dependency for all sub-projects.

Closes spring-projectsgh-22561
@sbrannen
Copy link
Member

Team Decision: Allow the use of AssertJ within our test suite but do not migrate all existing assertions to AssertJ for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

No branches or pull requests

2 participants