Skip to content

Commit

Permalink
Correct Collection Matchers Documentation For `collection.shouldConta…
Browse files Browse the repository at this point in the history
…inAllInAnyOrder()` (#3995)

Hello, we noticed a minor error in the documentation page: 

https://kotest.io/docs/assertions/collection-matchers.html

For:

```kotlin
collection.shouldContainAllInAnyOrder()
```

> Assert that a collection contains all the given values and nothing
else, in any order.

However it should be:

> Assert that a collection contains all the given values, in any order.

As the correct matcher for that incorrect description is:

```kotlin
collection.shouldContainExactlyInAnyOrder()
```

Feel free to reject if incorrect.

---------

Co-authored-by: Emil Kantis <emil.kantis@protonmail.com>
  • Loading branch information
u-ways-e and Kantis committed May 5, 2024
1 parent 2f9215c commit 6e2b079
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion documentation/docs/assertions/collections.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Also, see [inspectors](inspectors.md) which are useful ways to test multiple ele
| `collection.shouldContainDuplicates()` | Asserts that the collection contains at least one duplicate element. |
| `collection.shouldContainExactly()` | Assert that a collection contains exactly the given values and nothing else, in order. |
| `collection.shouldContainExactlyInAnyOrder()` | Assert that a collection contains exactly the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values, in _any_ order. |
| `collection.shouldContainNoNulls()` | Asserts that the collection contains no null elements, or is empty. |
| `collection.shouldContainNull()` | Asserts that the collection contains at least one null element. |
| `collection.shouldContainOnlyNulls()` | Asserts that the collection contains only null elements, or is empty. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Also, see [inspectors](inspectors.md) which are useful ways to test multiple ele
| `collection.shouldContainDuplicates()` | Asserts that the collection contains at least one duplicate element. |
| `collection.shouldContainExactly()` | Assert that a collection contains exactly the given values and nothing else, in order. |
| `collection.shouldContainExactlyInAnyOrder()` | Assert that a collection contains exactly the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values, in _any_ order. |
| `collection.shouldContainNoNulls()` | Asserts that the collection contains no null elements, or is empty. |
| `collection.shouldContainNull()` | Asserts that the collection contains at least one null element. |
| `collection.shouldContainOnlyNulls()` | Asserts that the collection contains only null elements, or is empty. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Also, see [inspectors](inspectors.md) which are useful ways to test multiple ele
| `collection.shouldContainDuplicates()` | Asserts that the collection contains at least one duplicate element. |
| `collection.shouldContainExactly(e1, e2, ..., en)` | Assert that a collection contains exactly the given elements and nothing else, in order. |
| `collection.shouldContainExactlyInAnyOrder(e1, e2, ..., en)` | Assert that a collection contains exactly the given elements and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder(e1, e2, ..., en)` | Assert that a collection contains all the given elements and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder(e1, e2, ..., en)` | Assert that a collection contains all the given elements, in _any_ order. |
| `collection.shouldContainNoNulls()` | Asserts that the collection contains no null elements, or is empty. |
| `collection.shouldContainNull()` | Asserts that the collection contains at least one null element. |
| `collection.shouldContainOnlyNulls()` | Asserts that the collection contains only null elements, or is empty. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Also, see [inspectors](inspectors.md) which are useful ways to test multiple ele
| `collection.shouldContainDuplicates()` | Asserts that the collection contains at least one duplicate element. |
| `collection.shouldContainExactly()` | Assert that a collection contains exactly the given values and nothing else, in order. |
| `collection.shouldContainExactlyInAnyOrder()` | Assert that a collection contains exactly the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values, in _any_ order. |
| `collection.shouldContainNoNulls()` | Asserts that the collection contains no null elements, or is empty. |
| `collection.shouldContainNull()` | Asserts that the collection contains at least one null element. |
| `collection.shouldContainOnlyNulls()` | Asserts that the collection contains only null elements, or is empty. |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Also, see [inspectors](inspectors.md) which are useful ways to test multiple ele
| `collection.shouldContainDuplicates()` | Asserts that the collection contains at least one duplicate element. |
| `collection.shouldContainExactly()` | Assert that a collection contains exactly the given values and nothing else, in order. |
| `collection.shouldContainExactlyInAnyOrder()` | Assert that a collection contains exactly the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values and nothing else, in _any_ order. |
| `collection.shouldContainAllInAnyOrder()` | Assert that a collection contains all the given values, in _any_ order. |
| `collection.shouldContainNoNulls()` | Asserts that the collection contains no null elements, or is empty. |
| `collection.shouldContainNull()` | Asserts that the collection contains at least one null element. |
| `collection.shouldContainOnlyNulls()` | Asserts that the collection contains only null elements, or is empty. |
Expand Down

0 comments on commit 6e2b079

Please sign in to comment.