Class EqualDateTimeOffsetConstraintWithSameOffset
EqualConstraint is able to compare an actual value with the expected value provided in its constructor. Two objects are considered equal if both are null, or if both have the same value. NUnit has special semantics for some object types.
Inherited Members
Namespace: NUnit.Framework.Constraints
Assembly: nunit.framework.dll
Syntax
public class EqualDateTimeOffsetConstraintWithSameOffset : Constraint, IConstraint, IResolveConstraint
Constructors
View SourceEqualDateTimeOffsetConstraintWithSameOffset(DateTimeOffset)
Initializes a new instance of the EqualConstraint class.
Declaration
public EqualDateTimeOffsetConstraintWithSameOffset(DateTimeOffset expected)
Parameters
Type | Name | Description |
---|---|---|
DateTimeOffset | expected | The expected value. |
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(DateTimeOffset)
Test whether the constraint is satisfied by a given value
Declaration
public ConstraintResult ApplyTo(DateTimeOffset actual)
Parameters
Type | Name | Description |
---|---|---|
DateTimeOffset | actual | The value to be tested |
Returns
Type | Description |
---|---|
ConstraintResult | True for success, false for failure |
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 | Description |
---|---|
ConstraintResult | True for success, false for failure |
Type Parameters
Name | Description |
---|---|
TActual |