Search Results for

    Show / Hide Table of Contents

    Class EqualDateTimeOffsetConstraint

    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.

    Inheritance
    object
    Constraint
    EqualTimeBaseConstraint<DateTimeOffset>
    EqualDateTimeOffsetConstraint
    Implements
    IConstraint
    IResolveConstraint
    Inherited Members
    EqualTimeBaseConstraint<DateTimeOffset>.Within(TimeSpan)
    EqualTimeBaseConstraint<DateTimeOffset>.Within(double)
    EqualTimeBaseConstraint<DateTimeOffset>.ApplyTo(DateTimeOffset)
    EqualTimeBaseConstraint<DateTimeOffset>.ApplyTo<TActual>(TActual)
    EqualTimeBaseConstraint<DateTimeOffset>.Expected
    EqualTimeBaseConstraint<DateTimeOffset>.Description
    Constraint.ApplyTo<TActual>(ActualValueDelegate<TActual>)
    Constraint.ApplyTo<TActual>(ref TActual)
    Constraint.ApplyToAsync<TActual>(Func<Task<TActual>>)
    Constraint.GetTestObject<TActual>(ActualValueDelegate<TActual>)
    Constraint.ToString()
    Constraint.GetStringRepresentation(IEnumerable)
    Constraint.GetStringRepresentation()
    Constraint.After(int)
    Constraint.After(int, int)
    Constraint.DisplayName
    Constraint.Arguments
    Constraint.Builder
    Constraint.And
    Constraint.With
    Constraint.Or
    object.GetType()
    object.MemberwiseClone()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    Namespace: NUnit.Framework.Constraints
    Assembly: nunit.framework.dll
    Syntax
    public class EqualDateTimeOffsetConstraint : EqualTimeBaseConstraint<DateTimeOffset>, IConstraint, IResolveConstraint

    Constructors

    View Source

    EqualDateTimeOffsetConstraint(DateTimeOffset)

    Initializes a new instance of the EqualConstraint class.

    Declaration
    public EqualDateTimeOffsetConstraint(DateTimeOffset expected)
    Parameters
    Type Name Description
    DateTimeOffset expected

    The expected value.

    Properties

    View Source

    WithSameOffset

    Flags the constraint to include Offset property in comparison of two DateTimeOffset values.

    Declaration
    public EqualDateTimeOffsetConstraintWithSameOffset WithSameOffset { get; }
    Property Value
    Type Description
    EqualDateTimeOffsetConstraintWithSameOffset
    Remarks

    Using this modifier does not allow to use the Within(object) constraint modifier.

    Implements

    IConstraint
    IResolveConstraint
    • View Source
    In this article
    Back to top Generated by DocFX | Copyright (c) 2018- The NUnit Project - Licensed under CC BY-NC-SA 4.0