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
Add NotContainEquivalentOf
with OccurrenceConstraint
parameter for string assertions
#2436
Conversation
NotContainEquivalentOf
with OccurrenceConstraint
NotContainEquivalentOf
with OccurrenceConstraint
parameter for string assertions
Qodana for .NETIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked View the detailed Qodana reportTo be able to view the detailed Qodana report, you can either:
To get - name: 'Qodana Scan'
uses: JetBrains/qodana-action@v2023.2.8
with:
upload-result: true Contact Qodana teamContact us at qodana-support@jetbrains.com
|
Pull Request Test Coverage Report for Build 6755617618
💛 - Coveralls |
/// </summary> | ||
/// <param name="unexpected">The string that the subject is not expected to contain.</param> | ||
/// <param name="occurrenceConstraint"> | ||
/// A constraint specifying the amount of times a substring should be present within the test subject. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔧 This isn't clear for me. How does the occurrence work in combination with "should not contain equivalent of"?
I'm having second thoughts on combining negated assertions with "abbbc".Should().NotContainEquivalentOf("b", MoreThan.Once()); can also be expressed as the affirmative "abbbc".Should().ContainEquivalentOf("b", AtMost.Once()); It took me an extra minute (at least) to realize that I also had to negate the |
Okay, I will remove this also from #2413 and close this PR... |
As discussed in #2364 add an overload for
NotContainEquivalentOf
that takes anOccurenceConstraint
parameter.IMPORTANT
./build.sh --target spellcheck
or.\build.ps1 --target spellcheck
before pushing and check the good outcome