CollectionOrdering.Any: How to specify a comparer? #1681
Unanswered
fubar-coder
asked this question in
Q&A
Replies: 1 comment 1 reply
-
|
Try upgrading to v0.7.15 and let me know if it fixes things for you 😄 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
is there a way to specify a comparer for
CollectionOrdering.Any?Example:
CollectionOrdering.Anytries to sort the the enumerables first, but doesn't try to cast the equality comparer to anIComparer<Test>and instead uses the default comparer, which results in the following error:Failed to compare two elements in the array..The only thing that I can do for now is to manually sort the array before passing it to the
Assert.My initial hope was, that it tries to use the equality comparer and a hash set (or two) to determine the differences between the actual and expected sequences.
Beta Was this translation helpful? Give feedback.
All reactions