Class CollectionItemsEqualConstraint
CollectionItemsEqualConstraint is the abstract base class for all
collection constraints that apply some notion of item equality
as a part of their operation.
Inheritance
CollectionItemsEqualConstraint
Assembly: nunit.framework.dll
Syntax
public abstract class CollectionItemsEqualConstraint : CollectionConstraint, IConstraint, IResolveConstraint
Constructors
View Source
CollectionItemsEqualConstraint()
Construct an empty CollectionConstraint
Declaration
protected CollectionItemsEqualConstraint()
View Source
CollectionItemsEqualConstraint(object?)
Construct a CollectionConstraint
Declaration
protected CollectionItemsEqualConstraint(object? arg)
Parameters
Type |
Name |
Description |
object |
arg |
|
Properties
View Source
IgnoreCase
Flag the constraint to ignore case and return self.
Declaration
public CollectionItemsEqualConstraint IgnoreCase { get; }
Property Value
View Source
IgnoreWhiteSpace
Flag the constraint to ignore white space and return self.
Declaration
public CollectionItemsEqualConstraint IgnoreWhiteSpace { get; }
Property Value
View Source
IgnoringCase
Get a flag indicating whether the user requested us to ignore case.
Declaration
protected bool IgnoringCase { get; }
Property Value
View Source
IgnoringWhiteSpace
Get a flag indicating whether the user requested us to ignore white space.
Declaration
protected bool IgnoringWhiteSpace { get; }
Property Value
View Source
UsingExternalComparer
Get a flag indicating whether any external comparers are in use.
Declaration
protected bool UsingExternalComparer { get; }
Property Value
Methods
View Source
ItemsEqual(object?, object?)
Compares two collection members for equality
Declaration
protected bool ItemsEqual(object? x, object? y)
Parameters
Returns
View Source
Tally(IEnumerable)
Return a new CollectionTally for use in making tests
Declaration
protected CollectionTally Tally(IEnumerable c)
Parameters
Type |
Name |
Description |
IEnumerable |
c |
The collection to be included in the tally
|
Returns
View Source
Using(IComparer)
Flag the constraint to use the supplied IComparer object.
Declaration
public CollectionItemsEqualConstraint Using(IComparer comparer)
Parameters
Type |
Name |
Description |
IComparer |
comparer |
The IComparer object to use.
|
Returns
View Source
Using(IEqualityComparer)
Flag the constraint to use the supplied IEqualityComparer object.
Declaration
public CollectionItemsEqualConstraint Using(IEqualityComparer comparer)
Parameters
Returns
View Source
UsingPropertiesComparer()
Enables comparing of instance properties.
Declaration
public CollectionItemsEqualConstraint UsingPropertiesComparer()
Returns
View Source
Using<T>(IComparer<T>)
Flag the constraint to use the supplied IComparer object.
Declaration
public CollectionItemsEqualConstraint Using<T>(IComparer<T> comparer)
Parameters
Type |
Name |
Description |
IComparer<T> |
comparer |
The IComparer object to use.
|
Returns
Type Parameters
View Source
Using<T>(IEqualityComparer<T>)
Flag the constraint to use the supplied IEqualityComparer object.
Declaration
public CollectionItemsEqualConstraint Using<T>(IEqualityComparer<T> comparer)
Parameters
Returns
Type Parameters
View Source
Using<T>(Comparison<T>)
Flag the constraint to use the supplied Comparison object.
Declaration
public CollectionItemsEqualConstraint Using<T>(Comparison<T> comparison)
Parameters
Type |
Name |
Description |
Comparison<T> |
comparison |
The Comparison object to use.
|
Returns
Type Parameters
View Source
Using<T>(Func<T, T, bool>)
Flag the constraint to use the supplied boolean-returning delegate.
Declaration
public CollectionItemsEqualConstraint Using<T>(Func<T, T, bool> comparer)
Parameters
Type |
Name |
Description |
Func<T, T, bool> |
comparer |
The supplied boolean-returning delegate to use.
|
Returns
Type Parameters
Implements