shouldly / shouldly

Should testing for .NET—the way assertions should be!

Home Page:https://docs.shouldly.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Implement way to check equivalency between two IEnumerables using Custom Comparer

DemetriouJohn opened this issue · comments

In NUnit framework one can simply compare two IEnumerables using the following

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

And with that we can check whether two Collections have the same data, based on comparer, but not caring about order.
FluentAssertions also have something similar
https://fluentassertions.com/collections/
collection.Should().BeEquivalentTo(8, 2, 1, 5);