Class MultipleOfConstraint
MultipleOfConstraint tests that the actual value is a multiple of a specified integer.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class MultipleOfConstraint : Constraint, IConstraint, IResolveConstraint
Constructors
View SourceMultipleOfConstraint(int)
Initializes an instance of the MultipleOfConstraint.
Declaration
public MultipleOfConstraint(int multiple)
Parameters
Type | Name | Description |
---|---|---|
int | multiple | An integer value greater than zero |
Properties
View SourceDescription
The Description of what this constraint tests, for use in messages and in the ConstraintResult.
Declaration
public override string Description { get; }
Property Value
Type | Description |
---|---|
string |
Overrides
Methods
View SourceApplyTo<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 | Description |
---|---|
ConstraintResult | True for success, false for failure |
Type Parameters
Name | Description |
---|---|
TActual |