Esempio n. 1
0
        public void GivenTwoInstancesWithTheSameValuesButInADifferentOrderThenEqualityIsNegative(
            int valueA,
            int valueB,
            int valueC)
        {
            var value1 = new TestValue(valueA, valueB, valueC);
            var value2 = new TestValue(valueC, valueB, valueA);

            Assert.NotEqual(value1, value2);
            Assert.False(value1 == value2);
            Assert.False(value1.Equals(value2));
            Assert.False(value2 == value1);
        }
Esempio n. 2
0
        public void GivenTwoInstancesWithEqualValuesThenEqualityIsPositive(
            int valueA,
            int valueB,
            int valueC)
        {
            var value1 = new TestValue(valueA, valueB, valueC);
            var value2 = new TestValue(valueA, valueB, valueC);

            Assert.NotSame(value1, value2);
            Assert.Equal(value1, value2);
            Assert.True(value1 == value2);
            Assert.True(value1.Equals(value2));
            Assert.True(value2 == value1);
        }
Esempio n. 3
0
        public void GivenTwoInstancesWithDifferentValuesThenEqualityIsNegative(
            int firstA,
            int firstB,
            int firstC,
            int secondA,
            int secondB,
            int secondC)
        {
            var value1 = new TestValue(firstA, firstB, firstC);
            var value2 = new TestValue(secondA, secondB, secondC);

            Assert.NotEqual(value1, value2);
            Assert.False(value1 == value2);
            Assert.False(value1.Equals(value2));
            Assert.False(value2 == value1);
        }