Background and motivation
We are working a lot with sets, like ImmutableHashSet, and often want to assert the equivalent of SetEquals between two sets. There is no offered API for this that I am aware of. I assume that the desired API in question wouldn't be concerned with sets specifically but just unordered equal for GenericCollectionAssertions, which would be functionally enough for the concerned use case.
Alternative Concerns
- The Equal methods is explicitly ordered so it's not a replacement.
- BeEquivalentTo does Equivalent comparison rather than equal, which is often not desired.
- Calling
.SetEquals(expectation).Should().BeTrue() has the issue of giving poor failure messages. If the assertion fails you want to see the difference between them.
- Equals is not implemented on almost any set implementation.
Are you willing help with a pull-request?
Yes, please assign this issue to me.
Background and motivation
We are working a lot with sets, like ImmutableHashSet, and often want to assert the equivalent of SetEquals between two sets. There is no offered API for this that I am aware of. I assume that the desired API in question wouldn't be concerned with sets specifically but just unordered equal for GenericCollectionAssertions, which would be functionally enough for the concerned use case.
Alternative Concerns
.SetEquals(expectation).Should().BeTrue()has the issue of giving poor failure messages. If the assertion fails you want to see the difference between them.Are you willing help with a pull-request?
Yes, please assign this issue to me.