forked from fluentassertions/fluentassertions
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Extend collection assertions with
ContainInConsecutiveOrder
and `No…
…tContainInConsecutiveOrder` (fluentassertions#1963) * Add ContainInConsecutiveOrder and NotContainInConsecutiveOrder Two functions to check that a cleections contains or doesn't contain the items from a second collections consecutively. * Optimise searching for expected list * Make NotContainsInConsecutiveOrder more efficient * Update docs/_pages/releases.md Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> * Rename Explicit to Consecutive * Format code based on PR comments * Rename Explicit to Consecuritve for the test classes * Refactor/rewrite ContainInConsecutiveOrder * Rewrote based on @jnyrup improvements * Rewrite NotContainsInConsecuritveOrder * Add test for ContainsInConsecutiveOrder when expected is empty * Update Src/FluentAssertions/Collections/GenericCollectionAssertions.cs Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> * Update Src/FluentAssertions/Collections/GenericCollectionAssertions.cs Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> * Update Src/FluentAssertions/Collections/GenericCollectionAssertions.cs Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com> * Cleanup and add SubjectIndexIsConsecutive helper function * Changes based on PR comments * Add int extension IsConsecutiveTo * Rewrote (Not)ContainInConsecutiveOrder functions to remove index manipulation Co-authored-by: Jonas Nyrup <jnyrup@users.noreply.github.com>
- Loading branch information
Showing
11 changed files
with
592 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.