Пример #1
0
        public void EqualsWithEmptyValueObjectsReturnTrue()
        {
            SimpleValueObject vo1 = new SimpleValueObject();
            SimpleValueObject vo2 = new SimpleValueObject();
            var equality          = vo1.Equals(vo2);

            Assert.AreEqual(true, equality);
        }
Пример #2
0
        public void EqualsWithOneDifferentPropertyReturnFalse()
        {
            SimpleValueObject vo1 = new SimpleValueObject();
            SimpleValueObject vo2 = new SimpleValueObject();

            vo1.i = 1;
            vo1.s = "string";
            vo2.i = 1;
            vo2.s = "s";

            var equality = vo1.Equals(vo2);

            Assert.AreEqual(false, equality);
        }
Пример #3
0
        public void EqualsWithEqualsValueObjectsReturnTrue()
        {
            SimpleValueObject vo1 = new SimpleValueObject();
            SimpleValueObject vo2 = new SimpleValueObject();

            vo1.i = 1;
            vo1.s = "string";
            vo2.i = 1;
            vo2.s = "string";

            var equality = vo1.Equals(vo2);

            Assert.AreEqual(true, equality);
        }