Class RangeConstraint
RangeConstraint tests whether two values are within a
specified range.
Inheritance
RangeConstraint
Assembly: nunit.framework.dll
Syntax
public class RangeConstraint : Constraint, IConstraint, IResolveConstraint
Constructors
View Source
RangeConstraint(object, object)
Declaration
public RangeConstraint(object from, object to)
Parameters
Type |
Name |
Description |
object |
from |
Inclusive beginning of the range.
|
object |
to |
Inclusive end of the range.
|
Properties
View Source
Description
Gets text describing a constraint
Declaration
public override string Description { get; }
Property Value
Overrides
Methods
View Source
ApplyTo<TActual>(TActual)
Test whether the constraint is satisfied by a given value
Declaration
public override ConstraintResult ApplyTo<TActual>(TActual actual)
Parameters
Type |
Name |
Description |
TActual |
actual |
The value to be tested
|
Returns
Type Parameters
Overrides
View Source
Using(IComparer)
Modifies the constraint to use an IComparer and returns self.
Declaration
public RangeConstraint Using(IComparer comparer)
Parameters
Returns
View Source
Using<T>(IComparer<T>)
Modifies the constraint to use an IComparer<T> and returns self.
Declaration
public RangeConstraint Using<T>(IComparer<T> comparer)
Parameters
Returns
Type Parameters
View Source
Using<T>(Comparison<T>)
Declaration
public RangeConstraint Using<T>(Comparison<T> comparer)
Parameters
Returns
Type Parameters
Implements