Skip to content

Conversation

@jnyrup
Copy link
Member

@jnyrup jnyrup commented Sep 25, 2023

This fixes #2169

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

Co-authored-by: IT-VBFK <49762557+IT-VBFK@users.noreply.github.com>
@github-actions
Copy link

github-actions bot commented Sep 25, 2023

Qodana for .NET

It 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 report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.6
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6303917071

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 97.276%

Totals Coverage Status
Change from base Build 6302426774: -0.001%
Covered Lines: 11627
Relevant Lines: 11833

💛 - Coveralls

Copy link
Member

@dennisdoomen dennisdoomen left a comment

Choose a reason for hiding this comment

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

What about the other methods asserting a collection?

@jnyrup jnyrup changed the title Change AllSatisfy to succeed on empty collections Change AllSatisfy to succeed on empty collections Sep 27, 2023
@jnyrup jnyrup added this to the 7.0 milestone Sep 27, 2023
@jnyrup
Copy link
Member Author

jnyrup commented Sep 27, 2023

What about the other methods asserting a collection?

If I understand your question, it's about the other methods on GenericCollectionAssertions should accept empty subject collections?

The only other I could find where we could also change this is OnlyContain, which was also requested to be changed in #1492.

@jnyrup jnyrup merged commit 02f9d47 into fluentassertions:develop Sep 28, 2023
@jnyrup jnyrup deleted the allsatisfy branch September 28, 2023 20:03
@IT-VBFK
Copy link
Contributor

IT-VBFK commented Sep 28, 2023

The only other I could find where we could also change this is OnlyContain, which was also requested to be changed in #1492.

huh... in terms of consistency.. is this a desired change?

@jnyrup
Copy link
Member Author

jnyrup commented Sep 29, 2023

The only other I could find where we could also change this is OnlyContain, which was also requested to be changed in #1492.

huh... in terms of consistency.. is this a desired change?

Inconsistency between AllSatisfy and OnlyContain?

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Sep 29, 2023

Haha 😂
No.. other way round: Is it desired to be changed?

@jnyrup
Copy link
Member Author

jnyrup commented Sep 29, 2023

To be sure I understand what you're asking.
Are you questioning whether this PR should have been merged at all?

@IT-VBFK
Copy link
Contributor

IT-VBFK commented Sep 29, 2023

Ahm.. no

Just asking if I can open a PR that aligns OnlyContain with AllSatisfy.

Sorry for the clunky conversation 🫣

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AllSatisfy() fails on empty collections

4 participants