8000 Add a bunch of assertions on `XElement` and `XDocument` by ITaluone · Pull Request #2690 · fluentassertions/fluentassertions · GitHub
[go: up one dir, main page]

Skip to content

Add a bunch of assertions on XElement and XDocument#2690

Merged
dennisdoomen merged 10 commits intofluentassertions:developfrom
ITaluone:feat/xdocument-element-absent
Oct 30, 2024
Merged

Add a bunch of assertions on XElement and XDocument#2690
dennisdoomen merged 10 commits intofluentassertions:developfrom
ITaluone:feat/xdocument-element-absent

Conversation

@ITaluone
Copy link
Contributor
@ITaluone ITaluone commented Jul 8, 2024
  • HaveElementWithValue(string expectedName, string expectedValue) - The element exists and has a particular value
    • XElementAssertions
    • XDocumentAssertions
  • NotHaveElement(string unexpectedName) - The element does not exist
    • XElementAssertions
    • XDocumentAssertions
  • NotHaveElementWithValue(string unexpectedName, string unexpectedValue) - The element either does not exist or doesn't have the particular value
    • XElementAssertions
    • XDocumentAssertions
  • HaveAttribute(string expectedName) - The attribute exists and can have any value
  • HaveAttributeWithValue(string expectedName, string expectedValue) - The attribute exists and has a particular value
  • NotHaveAttribute(string unexpectedName) - The attribute does not exist
  • NotHaveAttributeWithValue(string unexpectedName, string unexpectedValue) - The attribute either does not exist or doesn't have the particular value

Closes: #2589
Supersedes: #2588

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 Jul 8, 2024

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

Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link
coveralls commented Jul 8, 2024

Pull Request Test Coverage Report for Build 11588463853

Details

  • 203 of 203 (100.0%) changed or added relevant lines in 2 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.03%) to 97.656%

Totals Coverage Status
Change from base Build 11574987093: 0.03%
Covered Lines: 12387
Relevant Lines: 12560

💛 - Coveralls

@ITaluone ITaluone changed the title WIP: Add XelementAssertion for absent elements and/or values WIP: Add XElementAssertion for absent elements and/or values Jul 9, 2024
@ITaluone ITaluone force-pushed the feat/xdocument-element-absent branch 2 times, most recently from 0d7e599 to f275e00 Compare July 9, 2024 09:20
@ITaluone ITaluone changed the title WIP: Add XElementAssertion for absent elements and/or values WIP: Add a bunch of XElementAssertions Jul 9, 2024
@ITaluone ITaluone force-pushed the feat/xdocument-element-absent branch 2 times, most recently from 8b3f661 to 5f7fd15 Compare July 9, 2024 13:04
@ITaluone ITaluone changed the title WIP: Add a bunch of XElementAssertions WIP: Add a bunch of assertions on XElement and XDocument Jul 9, 2024
@ITaluone ITaluone force-pushed the feat/xdocument-element-absent branch from 04bbd13 to 0937a60 Compare July 9, 2024 14:07
@ITaluone ITaluone marked this pull request as ready for review July 9, 2024 14:17
@ITaluone ITaluone changed the title WIP: Add a bunch of assertions on XElement and XDocument Add a bunch of assertions on XElement and XDocument Jul 10, 2024
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.

It's a great start. Thanks for that.

I left an initial set of comments for some of the files, but which also need to be applied on the rest. Please re-request the review when you feel the rest also addresses the comments.