Skip to content
New issue

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

[suggestion] NUnit2046 doesn't flag Enumerable.SequenceEqual(Enumerable) #750

Open
Bartleby2718 opened this issue Jun 2, 2024 · 1 comment

Comments

@Bartleby2718
Copy link
Contributor

Very similar to #748, but for .SequenceEqual(). NUnit.Analyzers should be able to convert

var expected = new[] { 1, 2 };
var actual = new[] { 1, 2 };
Assert.That(actual.SequenceEqual(expected));

to

Assert.That(actual, Is.EquivalentTo(expected));

but it doesn't.

@Bartleby2718 Bartleby2718 changed the title [bug] NUnit2046 doesn't flag Enumerable.SequenceShouldEqual(Enumerable) [bug] NUnit2046 doesn't flag Enumerable.SequenceEqual(Enumerable) Jun 2, 2024
@manfred-brands manfred-brands changed the title [bug] NUnit2046 doesn't flag Enumerable.SequenceEqual(Enumerable) [suggestion] NUnit2046 doesn't flag Enumerable.SequenceEqual(Enumerable) Jun 2, 2024
@Bartleby2718
Copy link
Contributor Author

@manfred-brands Do you think this should be part of NUnit2046 or not?

The corresponding analyzer UseCollectionConstraintAnalyzer.cs has a very generic name, but it just checks for member access operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants