I want to make sure that all items in a collection to be different. How to do that?
Let's say:
IEnumerable collection = new[] { 1, 2, 5, 8 };
collection.Should().BeAllDifferent(); // NOTE: BeAllDifferent doesn't exist
I want to make sure that all items in a collection to be different. How to do that?
Let's say:
IEnumerable collection = new[] { 1, 2, 5, 8 };
collection.Should().BeAllDifferent(); // NOTE: BeAllDifferent doesn't exist
Try using
collection.Should().OnlyHaveUniqueItems().And.Should().BeOfType<int>();