Skip to content

Improve Assert.That error text message - #4702

Merged
OsirisTerje merged 2 commits into
nunit:masterfrom
iamdmitrij:3767-improve-message
May 2, 2024
Merged

Improve Assert.That error text message#4702
OsirisTerje merged 2 commits into
nunit:masterfrom
iamdmitrij:3767-improve-message

Conversation

@iamdmitrij

@iamdmitrij iamdmitrij commented May 2, 2024

Copy link
Copy Markdown
Contributor

Fixes #3767.

Assert.That for collections, error text changes to:

  Message: 
      Expected: exactly one item equal to "boop"
      But was:  **0 matching items** < "no-store, no-cache" >

by adding x matching item/s to the message text.

  • Add matching keyword to error message
  • Unit tests
  • Unit test for no matching items missing use-case

@OsirisTerje OsirisTerje left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

lgtm

@OsirisTerje
OsirisTerje merged commit db4a99f into nunit:master May 2, 2024
@iamdmitrij
iamdmitrij deleted the 3767-improve-message branch May 3, 2024 13:02
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.

Incorrect number of items listed in failure message

2 participants