Skip to content

Modernize exception assertions in BaseTaskExecutionDaoTestCases - #1041

Open
siddiqueirshad wants to merge 1 commit into
spring-cloud:mainfrom
siddiqueirshad:modernize-dao-exception-tests
Open

siddiqueirshad wants to merge 1 commit into
spring-cloud:mainfrom
siddiqueirshad:modernize-dao-exception-tests

Conversation

@siddiqueirshad

Copy link
Copy Markdown

Motivation / Summary

This pull request modernizes exception assertions in BaseTaskExecutionDaoTestCases by transitioning legacy try / catch / fail boilerplate to standard AssertJ fluent assertions using assertThatThrownBy(...).

Changes Made

  • In BaseTaskExecutionDaoTestCases:
    • getLatestTaskExecutionsByTaskNamesWithNullParameter: modernized with assertThatThrownBy.
    • getLatestTaskExecutionsByTaskNamesWithEmptyArrayParameter: modernized with assertThatThrownBy.
    • getLatestTaskExecutionsByTaskNamesWithArrayParametersContainingNullAndEmptyValues: modernized with assertThatThrownBy.
    • getLatestTaskExecutionForTaskNameWithNullParameter: modernized with assertThatThrownBy.
    • getLatestTaskExecutionForTaskNameWithEmptyStringParameter: modernized with assertThatThrownBy.
  • Replaced unused fail static import with assertThatThrownBy.

Signed-off-by: siddiqui irshad <mohdirshad1306@gmail.com>
@siddiqueirshad
siddiqueirshad force-pushed the modernize-dao-exception-tests branch from 52bc9e8 to cbf779b Compare November 2, 2026 15:27

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant