We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NUnit2021 fires when different types T1 and T2 are compared, but T1 implements IEquatable<T2>:
T1
T2
IEquatable<T2>
using Microsoft.Extensions.Primitives; using NUnit.Framework; namespace UnitTests { public class Tests { [Test] public void Test1() { var stringValues = new StringValues("abc"); Assert.That(stringValues, Is.EqualTo("abc")); // <-- NUnit2021 fires here. Test passes ✅. } } }
The text was updated successfully, but these errors were encountered:
I'll take a look
Sorry, something went wrong.
@Dreamescaper This is similar to the code for IComparable<T>. See ComparableTypesAnalyzer.IsIComparable.
IComparable<T>
Successfully merging a pull request may close this issue.
NUnit2021 fires when different types
T1
andT2
are compared, butT1
implementsIEquatable<T2>
:The text was updated successfully, but these errors were encountered: