We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BeInAscendingOrder fails when used with a propertyExpression parameter
BeInAscendingOrder
[Test] public void When_testing_order_of_lists() { var actual = new[] {1, 2, 3, 4}; actual.Should().BeInAscendingOrder(x => x); }
Should not fail.
Test fails with ArgumentNullException Stack Trace:
ArgumentNullException
System.ArgumentNullException : A member path cannot be null or empty (Parameter 'dottedPath') at FluentAssertions.Common.Guard.ThrowIfArgumentIsNullOrEmpty(String str, String paramName, String message) at FluentAssertions.Common.MemberPath..ctor(String dottedPath) at FluentAssertions.Common.ExpressionExtensions.GetMemberPath[TDeclaringType,TPropertyType](Expression`1 expression) at FluentAssertions.Collections.GenericCollectionAssertions`3.IsValidProperty[TSelector](Expression`1 propertyExpression, String because, Object[] becauseArgs) at FluentAssertions.Collections.GenericCollectionAssertions`3.BeOrderedBy[TSelector](Expression`1 propertyExpression, IComparer`1 comparer, SortOrder direction, String because, Object[] becauseArgs) at FluentAssertions.Collections.GenericCollectionAssertions`3.BeInAscendingOrder[TSelector](Expression`1 propertyExpression, IComparer`1 comparer, String because, Object[] becauseArgs) at FluentAssertions.Collections.GenericCollectionAssertions`3.BeInAscendingOrder[TSelector](Expression`1 propertyExpression, String because, Object[] becauseArgs)
Which version of Fluent Assertions are you using?
Removing the propertyExpression parameter and just using .BeInAscendingOrder() works as expected.
propertyExpression
.BeInAscendingOrder()
The text was updated successfully, but these errors were encountered:
Thanks for reporting this. I started my DeLorean, cranked it up to 88 mph and created #1802 to fix #1803.
Sorry, something went wrong.
6.5.1 with the fix is now available.
Successfully merging a pull request may close this issue.
Description
BeInAscendingOrder
fails when used with a propertyExpression parameterComplete minimal example reproducing the issue
Expected behavior:
Should not fail.
Actual behavior:
Test fails with
ArgumentNullException
Stack Trace:
Versions
Which version of Fluent Assertions are you using?
Additional Information
Removing the
propertyExpression
parameter and just using.BeInAscendingOrder()
works as expected.The text was updated successfully, but these errors were encountered: