AutoFixture.Kernel.Criterion.Equals C# (CSharp) Метод

Equals() публичный Метод

Compares a candidate value against this Criterion{T}.

This method compares the candidate other against Target, using Comparer as the comparison method. If this combination of target value and comparison method deems the candidate to be equal to this criterion, the return value is .

public Equals ( other ) : bool
other /// The candidate to compare against this value. ///
Результат bool
        public bool Equals(T other)
        {
            return this.Comparer.Equals(this.Target, other);
        }

Same methods

Criterion::Equals ( object obj ) : bool

Usage Example

Пример #1
0
        public void AUT_Criterion_Equals_Method_DirectCall_Overloading_Of_1_No_Exception_Thrown_Test()
        {
            // Arrange
            this.ValidateExecuteCondition(MethodEquals);
            var obj = this.CreateType <object>();

            // Act
            Action executeAction = () => _criterionInstance.Equals(obj);

            // Assert
            Should.NotThrow(executeAction);
        }