Skip to content

Commit

Permalink
Fix constraint with note
Browse files Browse the repository at this point in the history
  • Loading branch information
SeanKilleen committed Oct 16, 2023
1 parent 7c64da3 commit 7738f50
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ public void AnyOfCanDetectIfAnItemMatchesAnArrayOfParams()
public void AnyOfCanUseCustomComparisons()
{
var testValue = "NUnit";

// NOTE: Here we cast our comparison to IComparer, because StringComparer implements
// multiple interfaces that NUnit custom comparisons supports.
Assert.That(testValue, Is.AnyOf("hello", "world", "nunit").Using((IComparer)StringComparer.InvariantCultureIgnoreCase));
}
#endregion
Expand Down

0 comments on commit 7738f50

Please sign in to comment.