Class CollectionItemsEqualConstraint
- Namespace
- NUnit.Framework.Constraints
- Assembly
- nunit.framework.dll
CollectionItemsEqualConstraint is the abstract base class for all collection constraints that apply some notion of item equality as a part of their operation.
public abstract class CollectionItemsEqualConstraint : CollectionConstraint, IConstraint, IResolveConstraint
- Inheritance
-
CollectionItemsEqualConstraint
- Implements
- Derived
- Inherited Members
Constructors
CollectionItemsEqualConstraint()
Construct an empty CollectionConstraint
protected CollectionItemsEqualConstraint()
CollectionItemsEqualConstraint(object)
Construct a CollectionConstraint
protected CollectionItemsEqualConstraint(object arg)
Parameters
arg
object
Properties
IgnoreCase
Flag the constraint to ignore case and return self.
public CollectionItemsEqualConstraint IgnoreCase { get; }
Property Value
Methods
ItemsEqual(object, object)
Compares two collection members for equality
protected bool ItemsEqual(object x, object y)
Parameters
Returns
Tally(IEnumerable)
Return a new CollectionTally for use in making tests
protected CollectionTally Tally(IEnumerable c)
Parameters
c
IEnumerableThe collection to be included in the tally
Returns
Using(IComparer)
Flag the constraint to use the supplied IComparer object.
public CollectionItemsEqualConstraint Using(IComparer comparer)
Parameters
comparer
IComparerThe IComparer object to use.
Returns
Using(IEqualityComparer)
Flag the constraint to use the supplied IEqualityComparer object.
public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
Parameters
comparer
IEqualityComparerThe IComparer object to use.
Returns
Using<T>(IComparer<T>)
Flag the constraint to use the supplied IComparer object.
public CollectionItemsEqualConstraint Using<T>(IComparer<T> comparer)
Parameters
comparer
IComparer<T>The IComparer object to use.
Returns
Type Parameters
T
Using<T>(IEqualityComparer<T>)
Flag the constraint to use the supplied IEqualityComparer object.
public CollectionItemsEqualConstraint Using<T>(IEqualityComparer<T> comparer)
Parameters
comparer
IEqualityComparer<T>The IComparer object to use.
Returns
Type Parameters
T
Using<T>(Comparison<T>)
Flag the constraint to use the supplied Comparison object.
public CollectionItemsEqualConstraint Using<T>(Comparison<T> comparer)
Parameters
comparer
Comparison<T>The IComparer object to use.
Returns
Type Parameters
T