Method AreCollectionsEqual
- Namespace
- Xunit.Sdk
- Assembly
- xunit.v3.assert.dll
AreCollectionsEqual(CollectionTracker?, CollectionTracker?, IEqualityComparer, bool, out int?)
Determine if two enumerable collections are equal. It contains logic that varies depending on the collection type (supporting arrays, dictionaries, sets, and generic enumerables).
public static bool AreCollectionsEqual(CollectionTracker? x, CollectionTracker? y, IEqualityComparer itemComparer, bool isDefaultItemComparer, out int? mismatchedIndex)
Parameters
xFirst value to compare
ySecond value to comare
itemComparerIEqualityComparerThe comparer used for individual item comparisons
isDefaultItemComparerboolPass
trueif theitemCompareris the default item comparer from Xunit.Sdk.AssertEqualityComparer<T>; passfalse, otherwise.mismatchedIndexint?The output mismatched item index when the collections are not equal
Returns
- bool
Returns
trueif the collections are equal;false, otherwise.