Table of Contents

Class CollectionTally

Namespace
NUnit.Framework.Constraints
Assembly
nunit.framework.dll

CollectionTally counts (tallies) the number of occurrences of each object in one or more enumerations.

public sealed class CollectionTally
Inheritance
CollectionTally
Inherited Members

Constructors

CollectionTally(NUnitEqualityComparer, IEnumerable)

Construct a CollectionTally object from a comparer and a collection.

public CollectionTally(NUnitEqualityComparer comparer, IEnumerable c)

Parameters

comparer NUnitEqualityComparer

The comparer to use for equality.

c IEnumerable

The expected collection to compare against.

Properties

Result

The result of the comparison between the two collections.

public CollectionTally.CollectionTallyResult Result { get; }

Property Value

CollectionTally.CollectionTallyResult

Methods

TryRemove(IEnumerable)

Try to remove a set of objects from the tally.

public void TryRemove(IEnumerable c)

Parameters

c IEnumerable

The objects to remove.

TryRemove(object)

Try to remove an object from the tally.

public void TryRemove(object o)

Parameters

o object

The object to remove.