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

Extend AssertJThrowingCallableRules Refaster rule collection #609

Merged
merged 1 commit into from
May 3, 2023

Conversation

rickie
Copy link
Member

@rickie rickie commented May 1, 2023

While applying the Refaster rules internally I found another case that we are missing. This was intended as this list is not meant to be exhaustive. However, I feel it makes sense to be consistent and for that reason I added some of the missing cases for the assertThatNullPointerException, assertThatIOException, and assertThatExceptionOfType.

Now we have a StartsWith, MessageContaining, and MessageNotContaining for the ones that already had WithParams 😄.

Suggested commit message:

Extend `AssertJThrowingCallableRules` Refaster rule collection (#609)

@rickie rickie requested a review from Stephan202 May 1, 2023 19:10
@rickie rickie added this to the 0.10.0 milestone May 1, 2023
@github-actions
Copy link

github-actions bot commented May 1, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@Stephan202 Stephan202 force-pushed the rossendrijver/extend_assertjthrowing branch from 8042dc3 to e11005f Compare May 2, 2023 09:37
Copy link
Member

@Stephan202 Stephan202 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rebased; LGTM!

AbstractObjectAssert<?, ?> before(ThrowingCallable throwingCallable, String message) {
return assertThatNullPointerException()
.isThrownBy(throwingCallable)
.withMessageContaining(message);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are also format string overloads 😬. (But at we're fast reaching the point where a bug checker becomes lighter.)

@github-actions
Copy link

github-actions bot commented May 2, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

Copy link
Contributor

@Venorcis Venorcis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 😄

@rickie rickie force-pushed the rossendrijver/extend_assertjthrowing branch from e11005f to 9f21c5a Compare May 3, 2023 08:12
@github-actions
Copy link

github-actions bot commented May 3, 2023

Looks good. No mutations were possible for these changes.
Mutation testing report by Pitest. Review any surviving mutants by inspecting the line comments under Files changed.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 3, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@rickie rickie merged commit 4b69fe9 into master May 3, 2023
@rickie rickie deleted the rossendrijver/extend_assertjthrowing branch May 3, 2023 08:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants