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

Introduce AssertThatString{Contains,DoesNotContain} Refaster rules #1479

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

Stephan202
Copy link
Member

@Stephan202 Stephan202 commented Dec 25, 2024

Suggested commit message:

Introduce `AssertThatString{Contains,DoesNotContain}` Refaster rules (#1479)

While there, extend `AssertThatIterableIsEmpty`.

Comment on lines 264 to 270
Refaster.anyOf(
assertThat(iterable).hasSize(0),
assertThat(iterable.iterator().hasNext()).isFalse(),
assertThat(iterable.iterator()).isExhausted(),
assertThat(Iterables.size(iterable)).isEqualTo(0L),
assertThat(Iterables.size(iterable)).isNotPositive());
}
Copy link
Member Author

Choose a reason for hiding this comment

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

The rules in this class are not yet tested, and require further cleanup/generalization. For now I just added this case here to keep track of it.

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.

Clean 🧹

While there, extend `AssertThatIterableIsEmpty`.
@rickie rickie force-pushed the sschroevers/additional-assertj-string-rules branch from 1f50a21 to b805efb Compare December 25, 2024 12:18
@rickie
Copy link
Member

rickie commented Dec 25, 2024

Nice 😄

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.

@Stephan202 Stephan202 merged commit 83f3f8b into master Dec 25, 2024
16 checks passed
@Stephan202 Stephan202 deleted the sschroevers/additional-assertj-string-rules branch December 25, 2024 12:40
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