Extensions for IEnumerables.
More...
|
static void | ShouldMatchDataIn< T1, T2 > (this IEnumerable< T1 > src, IEnumerable< T2 > other) |
| Tests if src collection does not match data in other collection.
|
static void | ShouldMatchDataInAndOrderOf< T1, T2 > (this IEnumerable< T1 > src, IEnumerable< T2 > other) |
| Tests that two collections have the same data in the same order.
|
static bool | IsEquivalentTo< T > (this IEnumerable< T > src, IEnumerable< T > other) |
| Tests if two collections have equivalency (same items, order not guaranteed). Will rely on .Equals() on T.
|
static void | ShouldHaveUnique< T > (this IEnumerable< T > src, Func< T, bool > matcher) |
| Asserts that the provided Func filters to one unique value.
|
static void | ShouldContainOneDeepEqualTo< T > (this IEnumerable< T > src, T seek, params string[] ignoreProperties) |
| Asserts that the collection being operated on contains exactly one value deep equal to the provided one.
|
static void | ShouldContainAtLeastOneDeepEqualTo< T > (this IEnumerable< T > src, T seek, params string[] ignoreProperties) |
| Asserts that the collection being operated on contains at least one value deep equal to the provided one.
|
Extensions for IEnumerables.
◆ IsEquivalentTo< T >()
bool PeanutButter.TestUtils.Generic.EnumerableExtensions.IsEquivalentTo< T > |
( |
this IEnumerable< T > | src, |
|
|
IEnumerable< T > | other ) |
|
static |
Tests if two collections have equivalency (same items, order not guaranteed). Will rely on .Equals() on T.
- Parameters
-
- Template Parameters
-
- Returns
◆ ShouldContainAtLeastOneDeepEqualTo< T >()
void PeanutButter.TestUtils.Generic.EnumerableExtensions.ShouldContainAtLeastOneDeepEqualTo< T > |
( |
this IEnumerable< T > | src, |
|
|
T | seek, |
|
|
params string[] | ignoreProperties ) |
|
static |
Asserts that the collection being operated on contains at least one value deep equal to the provided one.
- Parameters
-
src | |
seek | |
ignoreProperties | |
- Template Parameters
-
◆ ShouldContainOneDeepEqualTo< T >()
void PeanutButter.TestUtils.Generic.EnumerableExtensions.ShouldContainOneDeepEqualTo< T > |
( |
this IEnumerable< T > | src, |
|
|
T | seek, |
|
|
params string[] | ignoreProperties ) |
|
static |
Asserts that the collection being operated on contains exactly one value deep equal to the provided one.
- Parameters
-
src | |
seek | |
ignoreProperties | |
- Template Parameters
-
◆ ShouldHaveUnique< T >()
void PeanutButter.TestUtils.Generic.EnumerableExtensions.ShouldHaveUnique< T > |
( |
this IEnumerable< T > | src, |
|
|
Func< T, bool > | matcher ) |
|
static |
Asserts that the provided Func filters to one unique value.
- Parameters
-
- Template Parameters
-
◆ ShouldMatchDataIn< T1, T2 >()
void PeanutButter.TestUtils.Generic.EnumerableExtensions.ShouldMatchDataIn< T1, T2 > |
( |
this IEnumerable< T1 > | src, |
|
|
IEnumerable< T2 > | other ) |
|
static |
Tests if src collection does not match data in other collection.
- type-agnostic: types with the same "shape" will match
- does not care about order
- Parameters
-
src | Primary source collection |
other | Collection to compare with |
- Template Parameters
-
T1 | Type of collection 1 |
T2 | Type of collection 2 |
◆ ShouldMatchDataInAndOrderOf< T1, T2 >()
void PeanutButter.TestUtils.Generic.EnumerableExtensions.ShouldMatchDataInAndOrderOf< T1, T2 > |
( |
this IEnumerable< T1 > | src, |
|
|
IEnumerable< T2 > | other ) |
|
static |
Tests that two collections have the same data in the same order.
- Parameters
-
- Template Parameters
-
The documentation for this class was generated from the following file:
- source/TestUtils/PeanutButter.TestUtils.Generic/EnumerableExtensions.cs