Skip to content

Commit

Permalink
extend documentation of ContainEquivalentOf(object)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiaslischka committed Oct 21, 2018
1 parent 5426a12 commit 48712d1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/_pages/documentation.md
Expand Up @@ -484,6 +484,8 @@ collection.Should().NotBeAscendingInOrder();
collection.Should().NotBeDescendingInOrder();
```

The `collection.Should().ContainEquivalentOf(boxedValue)` asserts that an collection contains at least one object that is equivalent to the expected object. The comparison is governed by the same rules and options as the [Object graph comparison](#object-graph-comparison).

Those last two methods can be used to assert a collection contains items in ascending or descending order.
For simple types that might be fine, but for more complex types, it requires you to implement `IComparable`, something that doesn't make a whole lot of sense in all cases.
That's why we offer overloads that take an expression.
Expand Down

0 comments on commit 48712d1

Please sign in to comment.