Skip to content

Conversation

OsirisTerje
Copy link
Member

@OsirisTerje OsirisTerje commented Sep 12, 2025

Fixed list of modifiers, removed duplicated entries
Added code to explain IgnoreWhiteSpace modifier.

@OsirisTerje OsirisTerje requested a review from Copilot September 12, 2025 18:58
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes documentation and code examples for the EqualTo constraint by reorganizing the modifiers list and adding explanation for the IgnoreWhiteSpace modifier.

  • Reorganized the modifiers list to remove duplicated entries and improve logical grouping
  • Added a code example demonstrating the IgnoreWhiteSpace modifier usage
  • Added documentation explaining that IgnoreWhiteSpace uses the same characters as C# Char.IsWhiteSpace

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
docs/snippets/Snippets.NUnit/ConstraintExamples.cs Added code example showing IgnoreWhiteSpace modifier usage
docs/articles/nunit/writing-tests/constraints/EqualConstraint.md Reorganized modifiers list, removed duplicates, and added IgnoreWhiteSpace explanation

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -44,6 +44,7 @@ public void EqualConstraint_Strings()
string[] expected = ["Hello", "World"];
string[] actual = ["HELLO", "world"];
Assert.That(actual, Is.EqualTo(expected).IgnoreCase);
Assert.That("Hello my world is \r\n on fire!", Is.EqualTo("Hellomy world \r\n is on fire!").IgnoreWhiteSpace);
Copy link
Member

Choose a reason for hiding this comment

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

Fun to see our own analyzer warnings on the PR here. :) maybe extract this to a variable?

Copy link
Member Author

Choose a reason for hiding this comment

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

Just to fool the analyzer ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

@OsirisTerje OsirisTerje merged commit fb945da into master Sep 14, 2025
7 checks passed
@OsirisTerje OsirisTerje deleted the updateEqualTo branch September 14, 2025 11:31
github-actions bot pushed a commit that referenced this pull request Sep 14, 2025
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.

3 participants