Search Results for

    Show / Hide Table of Contents

    Class SomeItemsConstraint<T>

    SomeItemsConstraint applies another constraint to each item in a collection, succeeding if any of them succeeds.

    Inheritance
    object
    Constraint
    PrefixConstraint
    SomeItemsConstraint
    SomeItemsConstraint<T>
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    SomeItemsConstraint.ApplyTo<TActual>(TActual)
    SomeItemsConstraint.Using<TActualCollectionElement, TExpected>(Func<TActualCollectionElement, TExpected, bool>)
    SomeItemsConstraint.Using(IComparer)
    SomeItemsConstraint.Using<T>(IComparer<T>)
    SomeItemsConstraint.Using<T>(Comparison<T>)
    SomeItemsConstraint.Using(IEqualityComparer)
    SomeItemsConstraint.Using<T>(IEqualityComparer<T>)
    SomeItemsConstraint.UsingPropertiesComparer()
    SomeItemsConstraint.UsingPropertiesComparer(Func<PropertiesComparerConfigurationUntyped, PropertiesComparerConfigurationUntyped>)
    SomeItemsConstraint.DisplayName
    PrefixConstraint.BaseConstraint
    PrefixConstraint.DescriptionPrefix
    PrefixConstraint.Description
    Constraint.ApplyTo<TActual>(ActualValueDelegate<TActual>)
    Constraint.ApplyTo<TActual>(ref TActual)
    Constraint.ApplyToAsync<TActual>(Func<Task<TActual>>)
    Constraint.GetTestObject<TActual>(ActualValueDelegate<TActual>)
    Constraint.ToString()
    Constraint.GetStringRepresentation(IEnumerable)
    Constraint.GetStringRepresentation()
    Constraint.After(int)
    Constraint.After(int, int)
    Constraint.Arguments
    Constraint.Builder
    Constraint.And
    Constraint.With
    Constraint.Or
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public class SomeItemsConstraint<T> : SomeItemsConstraint, IConstraint, IResolveConstraint
    Type Parameters
    Name Description
    T

    Constructors

    View Source

    SomeItemsConstraint(EqualConstraint<T>)

    Construct a SomeItemsConstraint on top of an existing constraint

    Declaration
    public SomeItemsConstraint(EqualConstraint<T> itemConstraint)
    Parameters
    Type Name Description
    EqualConstraint<T> itemConstraint

    Methods

    View Source

    UsingPropertiesComparer(Func<PropertiesComparerConfiguration<T>, PropertiesComparerConfiguration<T>>)

    Enables comparing a subset of instance properties.

    Declaration
    public SomeItemsConstraint UsingPropertiesComparer(Func<PropertiesComparerConfiguration<T>, PropertiesComparerConfiguration<T>> configure)
    Parameters
    Type Name Description
    Func<PropertiesComparerConfiguration<T>, PropertiesComparerConfiguration<T>> configure

    Function to configure the PropertiesComparerConfiguration

    Returns
    Type Description
    SomeItemsConstraint
    Remarks

    This allows comparing classes that don't implement IEquatable<T> without having to compare each property separately in own code.

    Implements

    IConstraint
    IResolveConstraint
    • 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