Skip to content

Add a note to XML-docs that explains the (Not)ContainEquivalentOf problem#2354

Merged
dennisdoomen merged 1 commit intofluentassertions:developfrom
IT-VBFK:fix/xml-doc-for-containequivalentof
Oct 8, 2023
Merged

Add a note to XML-docs that explains the (Not)ContainEquivalentOf problem#2354
dennisdoomen merged 1 commit intofluentassertions:developfrom
IT-VBFK:fix/xml-doc-for-containequivalentof

Conversation

@IT-VBFK
Copy link
Copy Markdown
Contributor

@IT-VBFK IT-VBFK commented Oct 1, 2023

This ref. and hopefully closes #2352

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

@IT-VBFK IT-VBFK changed the title Add a note to XML-docs that explains the (Not)ContainEquivalentOf p… Add a note to XML-docs that explains the (Not)ContainEquivalentOf problem Oct 1, 2023
@github-actions
Copy link
Copy Markdown

github-actions bot commented Oct 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/[email protected]
        with:
          upload-result: true
Contact Qodana team

Contact us at [email protected]

@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch from a00dea9 to 1b2bab6 Compare October 1, 2023 19:31
@coveralls
Copy link
Copy Markdown

coveralls commented Oct 2, 2023

Pull Request Test Coverage Report for Build 6448433890

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.386%

Totals Coverage Status
Change from base Build 6448041525: 0.0%
Covered Lines: 11643
Relevant Lines: 11835

💛 - Coveralls

@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch from 40cebde to 1c57cb0 Compare October 2, 2023 19:10
@IT-VBFK IT-VBFK requested a review from jnyrup October 4, 2023 18:25
@jnyrup
Copy link
Copy Markdown
Member

jnyrup commented Oct 5, 2023

How does these two views look in Rider?
I imagine the vast majority of our users only look at the text presented when IntelliSense view.
image
image

@ITaluone
Copy link
Copy Markdown
Contributor

ITaluone commented Oct 5, 2023

Rider:
image
image

Are there some tags that shows in VS but not in Rider?

@jnyrup
Copy link
Copy Markdown
Member

jnyrup commented Oct 5, 2023

Are there some tags that shows in VS but not in Rider?

Not to my knowledge.
But this is why I think we should improve the text in <summary> which will benefit all FA users, not matter if they use VS or Rider.

@ITaluone
Copy link
Copy Markdown
Contributor

ITaluone commented Oct 5, 2023

What about this? I moved the "Important" para up to summary

/// <summary>
/// Asserts that a collection of objects contains at least one object equivalent to another object.
/// <br />
/// <para>
/// <strong><b>Important:</b></strong> You cannot use this method to assert whether a collection contains a subset of another collection.
/// Use e.g. <see cref="BeSubsetOf"/> instead.
/// </para>
/// </summary>
/// <remarks>
/// <para>
/// By default, objects within the collection are seen as equivalent to the expected object when both object graphs have equally named properties with the same
/// value, irrespective of the type of those objects.
/// Notice that actual behavior is determined by the global defaults managed by <see cref="AssertionOptions"/>.
/// </para>
/// </remarks>
/// <param name="expectation">The expected element.</param>
/// <param name="because">
/// A formatted phrase as is supported by <see cref="string.Format(string,object[])" /> explaining why the assertion
/// is needed. If the phrase does not start with the word <i>because</i>, it is prepended automatically.
/// </param>
/// <param name="becauseArgs">
/// Zero or more objects to format using the placeholders in <paramref name="because"/>.
/// </param>

Rider:
image

VS:
image

@dennisdoomen
Copy link
Copy Markdown
Member

/// Asserts that a collection of objects contains at least one object equivalent to another object.

I think what I had was bettter, since it explicitly referred to the parameter.

@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch 3 times, most recently from 1a79f4e to cae2075 Compare October 6, 2023 20:36
@dennisdoomen
Copy link
Copy Markdown
Member

Check out what it looks like in Rider (notice the <string> XML element)

image

@IT-VBFK
Copy link
Copy Markdown
Contributor Author

IT-VBFK commented Oct 7, 2023

Yeah.. I had the same feelings. I will stick with <b> tags only

@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch 3 times, most recently from e0c4f2e to d12b007 Compare October 8, 2023 15:17
@IT-VBFK IT-VBFK requested a review from jnyrup October 8, 2023 15:17
@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch from d12b007 to ebbdfef Compare October 8, 2023 16:39
@IT-VBFK IT-VBFK force-pushed the fix/xml-doc-for-containequivalentof branch from ebbdfef to 6b2ef11 Compare October 8, 2023 16:50
@dennisdoomen dennisdoomen merged commit 9cab568 into fluentassertions:develop Oct 8, 2023
@IT-VBFK IT-VBFK deleted the fix/xml-doc-for-containequivalentof branch October 21, 2023 09:57
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Docs]: Improve documentation for ContainEquivalentOf

6 participants