Skip to content

Conversation

@vbreuss
Copy link
Contributor

@vbreuss vbreuss commented Nov 1, 2023

Refactor according to this comment in the SelfReferenceEquivalencyAssertionOptions:
Extract the private fields referenceTypes, valueTypes, getDefaultEqualityStrategy and equalityStrategyCache to a dedicated class EqualityStrategyProvider.

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

@github-actions
Copy link

github-actions bot commented Nov 1, 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.8
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

coveralls commented Nov 3, 2023

Pull Request Test Coverage Report for Build 6749532270

  • 73 of 74 (98.65%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.004%) to 97.393%

Changes Missing Coverage Covered Lines Changed/Added Lines %
Src/FluentAssertions/Equivalency/EqualityStrategyProvider.cs 60 61 98.36%
Totals Coverage Status
Change from base Build 6732220710: 0.004%
Covered Lines: 11735
Relevant Lines: 11926

💛 - Coveralls

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 3, 2023

This time the Qodana scan fails even after I rebased on the latest develop branch 😭

Any ideas?

@vbreuss
Copy link
Contributor Author

vbreuss commented Nov 3, 2023

I found this issue and this discussion which say

Unfortunately, qodana-dotnet doesn't support pr-mode analysis yet, but we're working on it!
Please disable it by setting pr-mode to false in your Qodana job configuration
Please follow the issue on our tracker to get notified when there are any updates.

😞

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.

Nice refactoring. Just some small comments.

@vbreuss vbreuss changed the title Add EqualityStrategyCache for SelfReferenceEquivalencyAssertionOptions Add EqualityStrategyProvider for SelfReferenceEquivalencyAssertionOptions Nov 3, 2023
Copy link
Member

@jnyrup jnyrup left a comment

Choose a reason for hiding this comment

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

I love how this encapsulation removes the sprinkled calls to Clear() from SelfReferenceEquivalencyAssertionOptions.

@jnyrup jnyrup merged commit 65412a2 into fluentassertions:develop Nov 4, 2023
@vbreuss vbreuss deleted the topic/refactor-extract-equalitystrategycache branch November 4, 2023 11:27
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Jul 14, 2024
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
jnyrup pushed a commit to jnyrup/fluentassertions that referenced this pull request Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants