Quantcast
Channel: Fluent Assertions
Viewing all articles
Browse latest Browse all 1402

Commented Issue: BeInOrder does not cater for duplicate values [12468]

$
0
0
The internal method BeInOrder does not cater for duplicate values.

An array like this {1, 6 12, 12, 15 ,17, 26}

Reports that the item at index 2 is in the wrong order. Looking at the code I can see this is because the comparison of items is done with

int indexOfActualItem = Array.IndexOf(actualItems, orderedItem);

Which of course is going to return 2 for both instances of 12.
Comments: Fixed in commit https://fluentassertions.codeplex.com/SourceControl/changeset/23647ff8786a7cabfd0974d3dcefb6b123722f41. The assertion itself was correctly implemented, but the index reported was wrong.

Viewing all articles
Browse latest Browse all 1402

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>