CountExtensions.HaveCount Method
Definition
Asserts that the enumerable has the specified number of elements.
public static ObjectAssertionsChain<T> HaveCount<T>(this ObjectAssertions<T> assertions, int expectedCount)
where T : IEnumerable;
Type Parameters
| Name | Description |
|---|---|
| T | The type of the enumerable. |
Parameters
| Name | Type | Description |
|---|---|---|
| assertions | ObjectAssertions<T> | The assertions object. |
| expectedCount | Int32 | The expected number of elements. |
Returns
An ObjectAssertionsChain<T> for chaining further assertions.