You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
so I think NUnit.Analyzers should suggest a fix for a better error message.
Notes:
It appears that the type parameter is required for Matches, but I'm not sure if Roslyn will be able to deduce it if the type parameter is absent (i.e. convert Assert.That(numbers.All(x => x % 2 == 0)); to the same Assert.That(numbers, Has.All.Matches<int>(x => x % 2 == 0));).
There's a typo in the link (custom custom), but I'm not sure where it's source-controlled.
The text was updated successfully, but these errors were encountered:
Today, NUnit.Analyzers (4.2.0) doesn't flag the following code:
However, NUnit has a constraint to support this use case:
so I think
NUnit.Analyzers
should suggest a fix for a better error message.Notes:
Matches
, but I'm not sure if Roslyn will be able to deduce it if the type parameter is absent (i.e. convertAssert.That(numbers.All(x => x % 2 == 0));
to the sameAssert.That(numbers, Has.All.Matches<int>(x => x % 2 == 0));
).custom custom
), but I'm not sure where it's source-controlled.The text was updated successfully, but these errors were encountered: