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 size-related AssertJEnumerableRules Refaster rules #1512

Merged
merged 3 commits into from
Feb 2, 2025

Conversation

rickie
Copy link
Member

@rickie rickie commented Jan 13, 2025

Suggested commit message:

Extend size-related `AssertJEnumerableRules` Refaster rules (#1512)

By also matching expressions ending in `.returnToIterable()`.

@rickie rickie requested a review from Stephan202 January 13, 2025 14:27
@rickie rickie added this to the 0.20.0 milestone Jan 13, 2025
@rickie rickie force-pushed the rossendrijver/assertj_return_iterable branch from 93a6276 to 5aa0832 Compare January 13, 2025 14:28
Copy link

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.

1 similar comment
Copy link

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

@mohamedsamehsalah mohamedsamehsalah left a comment

Choose a reason for hiding this comment

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

👍 👍

@Stephan202 Stephan202 changed the title Extend EnumerableAssertHasSize* Refaster rules Extend size-related AssertJEnumerableRules Refaster rules Feb 2, 2025
@Stephan202 Stephan202 force-pushed the rossendrijver/assertj_return_iterable branch from 5aa0832 to ee7defc Compare February 2, 2025 11:35
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 and added a commit. Also updated the suggested commit message; PTAL :)

@BeforeTemplate
AbstractIterableAssert<?, ?, E, ?> before2(AbstractIterableAssert<?, ?, E, ?> enumAssert) {
return Refaster.anyOf(
enumAssert.size().isNotEqualTo(0).returnToIterable(),
enumAssert.size().isPositive().returnToIterable());
}
Copy link
Member

Choose a reason for hiding this comment

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

Arguably the newly added templates are the correct ones, while the existing ones aren't fully correct. Will add a commit to swap them and call this out.

Copy link

github-actions bot commented Feb 2, 2025

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

sonarqubecloud bot commented Feb 2, 2025

@rickie rickie merged commit 77557c8 into master Feb 2, 2025
17 checks passed
@rickie rickie deleted the rossendrijver/assertj_return_iterable branch February 2, 2025 11:46
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