-
Is it possible to verify, that two lists contain the same elements regardless of the order? E.g. string[] subject = ["foo", "bar", "baz"];
string[] expected = ["baz", "bar", "foo"];
await Assert.That(subject).IsEquivalentTo(expected);
// This currently throws an exception:
// Expected subject to be equivalent to expected
// but it is System.String[] |
Beta Was this translation helpful? Give feedback.
Answered by
thomhurst
Dec 5, 2024
Replies: 1 comment 1 reply
-
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
vbreuss
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
await Assert.That(subject).IsEquivalentTo(expected, CollectionOrdering.Any);