Table of Contents

Method AreCollectionsEqual

Namespace
Xunit.Sdk
Assembly
xunit.v3.assert.dll

AreCollectionsEqual(CollectionTracker?, CollectionTracker?, IEqualityComparer, bool)

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 AssertEqualityResult AreCollectionsEqual(CollectionTracker? x, CollectionTracker? y, IEqualityComparer itemComparer, bool isDefaultItemComparer)

Parameters

x

First value to compare

y

Second value to comare

itemComparer IEqualityComparer

The comparer used for individual item comparisons

isDefaultItemComparer bool

Pass true if the itemComparer is the default item comparer from Xunit.Sdk.AssertEqualityComparer<T>; pass false, otherwise.

Returns

Returns true if the collections are equal; false, otherwise.