Equals() public method

public Equals ( object obj ) : bool
obj object
return bool
Beispiel #1
0
        public void SutDoesNotEqualAnonymousObject()
        {
            var sut = new PropertyProcessor();
            var anonymous = new object();

            var actual = sut.Equals(anonymous);

            Assert.False(actual);
        }
Beispiel #2
0
        public void SutEqualsOtherReturnsCorrectResult(
            string priceTextSut,
            string priceTextOther,
            bool expected)
        {
            var sut = new PropertyProcessor { PriceText = priceTextSut };
            var other = new PropertyProcessor { PriceText = priceTextOther };

            var actual = sut.Equals(other);

            Assert.Equal(expected, actual);
        }