Skip to content

Polish Spring Batch Infrastructure tests #4175

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

Merged
merged 1 commit into from
Aug 2, 2022
Merged

Polish Spring Batch Infrastructure tests #4175

merged 1 commit into from
Aug 2, 2022

Conversation

hpoettker
Copy link
Contributor

This PR is in scope of #4166 polishes the tests in Spring Batch Infrastructure that have been migrated to JUnit 5 in #4125.

The goal of the PR is to improve the readability of the tests by reducing visual clutter and using more concise test constructs where directly available, i.e.

  • test classes and methods are now package-private where possible
  • not-required throws clauses are removed from test method signatures
  • all Assertions are changed to static imports
  • assertThrows and assertDoesNotThrow are used where previoulsy try, catch, and fail were used in a much more verbose style
  • @MockitoSettings is used to set strictness of mocking at the class level

Some final modifiers have been added to class variables to make clearer whether they are expected to change or not during the tests, respectively.

@hpoettker
Copy link
Contributor Author

I rebased on main to fix the merge conflict with #4171. RecordFieldExtractorTests is no longer changed in this PR.

@fmbenhassine
Copy link
Contributor

I rebased on main to fix the merge conflict with #4171. RecordFieldExtractorTests is no longer changed in this PR.

Great! I was about to do it locally. Thank you for the update!

@fmbenhassine fmbenhassine merged commit e4056b4 into spring-projects:main Aug 2, 2022
@fmbenhassine fmbenhassine mentioned this pull request Aug 2, 2022
5 tasks
@hpoettker hpoettker deleted the jupiter-infrastructure branch August 17, 2022 20:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants