Search Results for

    Show / Hide Table of Contents

    Class CollectionTally

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

    Inheritance
    object
    CollectionTally
    Inherited Members
    object.GetType()
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public sealed class CollectionTally

    Constructors

    View Source

    CollectionTally(NUnitEqualityComparer, IEnumerable)

    Construct a CollectionTally object from a comparer and a collection.

    Declaration
    public CollectionTally(NUnitEqualityComparer comparer, IEnumerable c)
    Parameters
    Type Name Description
    NUnitEqualityComparer comparer

    The comparer to use for equality.

    IEnumerable c

    The expected collection to compare against.

    Properties

    View Source

    Result

    The result of the comparison between the two collections.

    Declaration
    public CollectionTally.CollectionTallyResult Result { get; }
    Property Value
    Type Description
    CollectionTally.CollectionTallyResult

    Methods

    View Source

    TryRemove(IEnumerable)

    Try to remove a set of objects from the tally.

    Declaration
    public void TryRemove(IEnumerable c)
    Parameters
    Type Name Description
    IEnumerable c

    The objects to remove.

    View Source

    TryRemove(object)

    Try to remove an object from the tally.

    Declaration
    public void TryRemove(object o)
    Parameters
    Type Name Description
    object o

    The object to remove.

    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0