Class SomeItemsConstraint<T>
SomeItemsConstraint applies another constraint to each item in a collection, succeeding if any of them succeeds.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class SomeItemsConstraint<T> : SomeItemsConstraint, IConstraint, IResolveConstraint
Type Parameters
Name | Description |
---|---|
T |
Constructors
View SourceSomeItemsConstraint(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 SourceUsingPropertiesComparer(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.