From 48712d15ea65d30ae2a545e5e51ad02a82f3fe6b Mon Sep 17 00:00:00 2001 From: Matthias Lischka Date: Sun, 21 Oct 2018 17:24:11 +0200 Subject: [PATCH] extend documentation of ContainEquivalentOf(object) --- docs/_pages/documentation.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/_pages/documentation.md b/docs/_pages/documentation.md index 58b62ed98f..5abd1a02cb 100644 --- a/docs/_pages/documentation.md +++ b/docs/_pages/documentation.md @@ -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.