{{ message }}
Order by multiple properties sequentially#1416
Merged
Merged
Conversation
Contributor
Author
dennisdoomen
requested changes
Oct 28, 2020
dennisdoomen
left a comment
Member
There was a problem hiding this comment.
👍 Nice work.
❌ Please update the title to be functional
| namespace FluentAssertions.Collections | ||
| { | ||
| [DebuggerNonUserCode] | ||
| public class SubsequentOrderingGenericCollectionAssertions<T> : |
Member
There was a problem hiding this comment.
🔧 Maybe rename it to SubsequentOrderingAssertions?
| * Added `ComparingBy{Members,Value}(Type)` to allow specifying open generic types - [#1389](https://github.com/fluentassertions/fluentassertions/pull/1389). | ||
| * Added overload of `CollectionAssertions.NotBeEquivalentTo` that takes a `config` parameter` - [#1408](https://github.com/fluentassertions/fluentassertions/pull/1408). | ||
| * Changed `StringAssertions.StartWith`, `StringAssertions.EndWith` and their `EquivalentOf` versions to allow empty strings - [#1413](https://github.com/fluentassertions/fluentassertions/pull/1413). | ||
| * Added ThenBeInAscendingOrder and ThenBeInDescendingOrder to allow asserting that a subsequence is ordered in ascending or descending order - [#1416](https://github.com/fluentassertions/fluentassertions/pull/1416). |
Member
There was a problem hiding this comment.
🙃 Would be nice to format those names using back-ticks.
| #region Then be in order | ||
|
|
||
| [Fact] | ||
| public void When_asserting_subsequence_by_then_be_in_ascending_order_it_should_pass() |
Member
There was a problem hiding this comment.
🤔 Try to keep the names of test functional and never refer to the literal name of a method or API, e.g.
When_the_collection_is_ordered_according_to_the_subsequent_ordering_assertion_it_should_succeed
jnyrup
reviewed
Oct 28, 2020
jnyrup
left a comment
Member
There was a problem hiding this comment.
Does this support multiple ThenBeInAscendingOrder?
E.g.
collection.Should()
.BeInAscendingOrder(x => x.Item1)
.And
.ThenBeInAscendingOrder(x => x.Item2)
.And
.ThenBeInAscendingOrder(x => x.Item3);
Contributor
Author
jnyrup
approved these changes
Oct 28, 2020
dennisdoomen
approved these changes
Oct 28, 2020
7 tasks
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

IMPORTANT
AcceptApiChanges.ps1/AcceptApiChanges.sh.Issue #1160