-
Notifications
You must be signed in to change notification settings - Fork 731
Description
Description
We were writing tests where we needed to check if one collection contained another in order. For this, we used ContainInOrder.
However, we found that because ContainInOrder doesn't check that the items are consecutive we could introduce mutations in the code and our tests would still pass.
To solve this we have made a new method in the same class, GenericCollectionAssertions, called ContainInConsecutiveOrder. This is a stricter version of the current check, adding the check that the expected items all appear in consecutive order. For completeness, we also introduced the opposite NotContainInConsecutiveOrder.
The API change is an extension to the API, with, as far as I can see, no breaking changes.
We have implemented these changes, with associated tests, in a branch and would like to submit a PR.