Skip to content

Commit aecb6c7

Browse files
authored
Removed collectioncontains documentation as it's not there (#1106)
* Removed collectioncontains documentation as it's not there * Removed collectioncontains documentation as it's not there * Removed collectioncontains documentation as it's not there
1 parent e921713 commit aecb6c7

File tree

6 files changed

+17
-48
lines changed

6 files changed

+17
-48
lines changed

docs/articles/nunit/writing-tests/assertions/classic-assertions/Assert.Contains.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,3 @@ ClassicAssert.Contains(object anObject, ICollection collection,
1010
```
1111

1212
## See Also
13-
14-
* [CollectionContainsConstraint](xref:collectioncontainsconstraint)

docs/articles/nunit/writing-tests/constraints/AnyOfConstraint.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
> [!NOTE]
66
> Values provided must be as parameters to the method, not as e.g. a separate array. If you are instead looking
7-
> to see if a collection contains a value, see the [CollectionContains Constraint](xref:collectioncontainsconstraint).
7+
> to see if a collection contains a value, see the [SomeItems Constraint](xref:someitemsconstraint).
88
99
## Constructor
1010

docs/articles/nunit/writing-tests/constraints/CollectionContainsConstraint.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

docs/articles/nunit/writing-tests/constraints/Constraints.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ Constraint Name |
2121
[AttributeExistsConstraint](AttributeExistsConstraint.md) |
2222
[AnyOfConstraint](AnyOfConstraint.md) |
2323
[BinarySerializableConstraint](BinarySerializableConstraint.md) |
24-
[CollectionContainsConstraint](CollectionContainsConstraint.md) |
2524
[CollectionEquivalentConstraint](CollectionEquivalentConstraint.md) |
2625
[CollectionOrderedConstraint](CollectionOrderedConstraint.md) |
2726
[CollectionSubsetConstraint](CollectionSubsetConstraint.md) |
@@ -77,7 +76,6 @@ Constraint Name |
7776
-------------------------------------|
7877
[AllItemsConstraint](AllItemsConstraint.md) |
7978
[AnyOfConstraint](AnyOfConstraint.md) |
80-
[CollectionContainsConstraint](CollectionContainsConstraint.md) |
8179
[CollectionEquivalentConstraint](CollectionEquivalentConstraint.md) |
8280
[CollectionOrderedConstraint](CollectionOrderedConstraint.md) |
8381
[CollectionSubsetConstraint](CollectionSubsetConstraint.md) |

docs/articles/nunit/writing-tests/constraints/SomeItemsConstraint.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
1+
---
2+
uid: someitemsconstraint
3+
---
14
# SomeItems Constraint
25

36
`SomeItemsConstraint` applies a constraint to each item in an `IEnumerable`, succeeding if at least one of them
47
succeeds. An exception is thrown if the actual value passed does not implement `IEnumerable`.
58

9+
This constraint will also cover `Contains` functionality. See examples below.
10+
611
## Constructor
712

813
```csharp
@@ -13,6 +18,9 @@ SomeItemsConstraint(Constraint itemConstraint)
1318

1419
```csharp
1520
Has.Some...
21+
Has.Member(object)
22+
Contains.Item(object)
23+
Does.Contain(object)
1624
```
1725

1826
## Modifiers
@@ -40,3 +48,11 @@ string[] sarray = new string[] { "a", "b", "c" };
4048
Assert.That(iarray, Has.Some.GreaterThan(2));
4149
Assert.That(sarray, Has.Some.Length.EqualTo(1));
4250
```
51+
52+
### Contains examples
53+
54+
[!code-csharp[Collection Contains Examples](~/snippets/Snippets.NUnit/ConstraintExamples.cs#CollectionContainsExamples)]
55+
56+
## Note
57+
58+
`Has.Member()`, `Contains.Item()` and `Does.Contain()` work the same as `Has.Some.EqualTo()`.

docs/articles/nunit/writing-tests/constraints/toc.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616
href: AttributeExistsConstraint.md
1717
- name: BinarySerializableConstraint
1818
href: BinarySerializableConstraint.md
19-
- name: CollectionContainsConstraint
20-
href: CollectionContainsConstraint.md
2119
- name: CollectionEquivalentConstraint
2220
href: CollectionEquivalentConstraint.md
2321
- name: CollectionOrderedConstraint

0 commit comments

Comments
 (0)