Esempio n. 1
0
        public void IdenticalDataIsNotEqualOperatorIsFalseTestWithList()
        {
            //Arraneg
            var integers1 = new Integers
            {
                Ints = new List <int> {
                    3, 1
                }
            };
            var integers2 = new Integers
            {
                Ints = new List <int> {
                    1, 3
                }
            };

            //Act
            var resultEquals         = integers1 != integers2;
            var resultEqualsSimetric = integers2 != integers1;

            // ReSharper disable once EqualExpressionComparison
            //var resultEqualsOnThis = address1 != address1;

            //Assert
            Assert.False(resultEquals);
            Assert.False(resultEqualsSimetric);
            //Assert.False(resultEqualsOnThis);
        }
Esempio n. 2
0
        public void SameListDistinctOrderAreEquals()
        {
            //Arrange
            var integers1 = new Integers
            {
                Ints = new List <int> {
                    3, 1
                }
            };
            var integers2 = new Integers
            {
                Ints = new List <int> {
                    1, 3
                }
            };

            //Act

            //Assert
            Assert.True(integers1.Equals(integers2));
            Assert.Equal(integers1, integers2);
        }