Ejemplo n.º 1
0
        public void ClassWithOneNullStringShouldReturnVariance()
        {
            // Assert
            var c1 = new MutableClass
            {
                Int1    = 1,
                String1 = null
            };

            var c2 = new MutableClass
            {
                Int1    = 1,
                String1 = "test"
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Equal("String1", variances[0].PropertyName);
            Assert.Null(variances[0].PropertyValue1);
            Assert.Equal("test", variances[0].PropertyValue2);

            // Parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Equal(c1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.ParentVariance);
        }
Ejemplo n.º 2
0
        public void ClassWithOneNullInnerClassContentsShouldReturnVariance()
        {
            // Arrange
            var inner = new ImmutableClass(2, "test");
            var c1    = new MutableClass
            {
                Int1       = 1,
                String1    = "test",
                Immutable1 = inner
            };

            var c2 = new MutableClass
            {
                Int1       = 1,
                String1    = "test",
                Immutable1 = null
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Equal("Immutable1", variances[0].PropertyName);
            Assert.Equal(inner, variances[0].PropertyValue1);
            Assert.Null(variances[0].PropertyValue2);

            // Parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Equal(c1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.ParentVariance);
        }
Ejemplo n.º 3
0
        public void ClassesWithTwoKeysCanBeDetected()
        {
            // Arrange
            List <ClassWithTwoKeys> l1 = TwoKeyCollection1.ToList();
            List <ClassWithTwoKeys> l2 = TwoKeyCollection2.ToList();

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(l1, l2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(2, variances.Count);

            Assert.Equal("Extra object in IEnumerable 1 with key {Id=1, Name=Abc}", variances[0].PropertyName);
            Assert.Equal(l1[0], variances[0].PropertyValue1);
            Assert.Null(variances[0].PropertyValue2);

            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(l1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.PropertyName);

            Assert.Null(variances[0].ParentVariance.ParentVariance);

            Assert.Equal("Extra object in IEnumerable 2 with key {Id=1, Name=Cba}", variances[1].PropertyName);
            Assert.Null(variances[1].PropertyValue1);
            Assert.Equal(l2[0], variances[1].PropertyValue2);

            Assert.NotNull(variances[1].ParentVariance);
            Assert.Equal(l1, variances[1].ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[1].ParentVariance.PropertyValue2);
            Assert.Null(variances[1].ParentVariance.PropertyName);

            Assert.Null(variances[1].ParentVariance.ParentVariance);
        }
        public void DifferenceInPropertiesWithIgnoreVarianceShouldBeIgnored()
        {
            // Arrange
            var inner1 = new IgnoreVarianceClass
            {
                Id      = 201,
                IsHappy = false,
                Name    = "sdafsdf"
            };

            var inner2 = new IgnoreVarianceClass
            {
                Id      = 1231,
                IsHappy = true,
                Name    = "dafsdsdaf"
            };

            var c1 = new IgnoreVarianceClassesHolder
            {
                IgnoreVarianceClass = inner1
            };

            var c2 = new IgnoreVarianceClassesHolder
            {
                IgnoreVarianceClass = inner2
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.Empty(variances);
        }
        public void OtherVariancesInPropertiesShouldStillBeReported()
        {
            // Arrange
            var u1 = new User
            {
                Age  = 10,
                Id   = 1,
                Name = "Rex"
            };
            var u2 = new User
            {
                Age  = 213,
                Id   = 2,
                Name = "Rex"
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(u1, u2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);

            Assert.Equal("Id", variances[0].PropertyName);
            Assert.Equal(1, variances[0].PropertyValue1);
            Assert.Equal(2, variances[0].PropertyValue2);

            Assert.NotNull(variances[0].ParentVariance);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Equal(u1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(u2, variances[0].ParentVariance.PropertyValue2);

            Assert.Null(variances[0].ParentVariance.ParentVariance);
        }
Ejemplo n.º 6
0
        public void UnequalListOfIntsShouldReturnVariance()
        {
            // Arrange
            var list1 = new List <int> {
                1, 2, 3
            };
            var list2 = new List <int> {
                1, 2, 2
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(list1, list2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Equal("this[2]", variances[0].PropertyName);
            Assert.Equal(3, variances[0].PropertyValue1);
            Assert.Equal(2, variances[0].PropertyValue2);

            // Parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Equal(list1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(list2, variances[0].ParentVariance.PropertyValue2);
        }
        public void DifferenceInListsWithIgnoreVarianceShouldBeIgnored()
        {
            // Arrange
            var l1 = new List <IgnoreVarianceClass>
            {
                new IgnoreVarianceClass
                {
                    Id      = 201,
                    IsHappy = false,
                    Name    = "sdafsdf"
                }
            };

            var l2 = new List <IgnoreVarianceClass>
            {
                new IgnoreVarianceClass
                {
                    Id      = 1231,
                    IsHappy = true,
                    Name    = "dafsdsdaf"
                }
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(l1, l2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 8
0
        public void TwoEqualDecimalsShouldReturnNoVariance()
        {
            // Arrange and Act
            IEnumerable <ObjectVariance> variances = ObjectComparer.GetObjectVariances(.1m, .1m);

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 9
0
        public void EqualOneLevelStringsShouldReturnNoVariance()
        {
            // Arrange and Act
            IEnumerable <ObjectVariance> variances = ObjectComparer.GetObjectVariances("test", "test");

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 10
0
        public void TwoNullsShouldReturnNoVariance()
        {
            // Arrange and Act
            IEnumerable <ObjectVariance> variances = ObjectComparer.GetObjectVariances(null, null);

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 11
0
        public void EqualArraysOfIntsShouldReturnNoVariance()
        {
            // Arrange
            var array1 = new[] { 1, 2, 3 };
            var array2 = new[] { 1, 2, 3 };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(array1, array2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 12
0
        public void UnequalStringsShouldReturnVariance()
        {
            // Arrange and Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances("test", "tast").ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal("test", variances[0].PropertyValue1);
            Assert.Equal("tast", variances[0].PropertyValue2);
            Assert.Null(variances[0].PropertyName);
            Assert.Null(variances[0].ParentVariance);
        }
Ejemplo n.º 13
0
        public void ListOfUsersShouldBeComparedUsingKeys()
        {
            // Arrange
            List <User> l1 = UserCollection1.ToList();
            List <User> l2 = UserCollection2.ToList();

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(l1, l2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 14
0
        public void DifferentReferencesOfObjectsShouldReturnNoVariance()
        {
            // Arrange
            var obj1 = new object();
            var obj2 = new object();

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(obj1, obj2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 15
0
        public void TwoDifferentIntsShouldReturnVariance()
        {
            // Arrange and Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(1, 2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Null(variances[0].PropertyName);
            Assert.Equal(1, variances[0].PropertyValue1);
            Assert.Equal(2, variances[0].PropertyValue2);
            Assert.Null(variances[0].ParentVariance);
        }
Ejemplo n.º 16
0
        public void TwoDifferentDecimalsShouldReturnVariance()
        {
            // Arange and Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(1.1m, 2.2m).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Null(variances[0].PropertyName);
            Assert.Equal(1.1m, variances[0].PropertyValue1);
            Assert.Equal(2.2m, variances[0].PropertyValue2);
            Assert.IsNotType <double>(variances[0].PropertyValue1);
            Assert.IsNotType <double>(variances[0].PropertyValue2);
            Assert.Null(variances[0].ParentVariance);
        }
Ejemplo n.º 17
0
        public void ListOfUsersWithDifferentKeysShouldYieldVariance()
        {
            // Arrange
            List <User> l1 = UserCollection1.ToList();
            List <User> l2 = UserCollection3.ToList();

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(l1, l2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(3, variances.Count);
            Assert.Equal("Extra object in IEnumerable 1 with key {Id=3}", variances[0].PropertyName);
            Assert.Equal(l1[2], variances[0].PropertyValue1);
            Assert.Null(variances[0].PropertyValue2);

            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(l1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.PropertyName);

            Assert.Null(variances[0].ParentVariance.ParentVariance);

            Assert.Equal("Extra object in IEnumerable 2 with key {Id=4}", variances[1].PropertyName);
            Assert.Null(variances[1].PropertyValue1);
            Assert.Equal(l2[2], variances[1].PropertyValue2);

            Assert.NotNull(variances[1].ParentVariance);
            Assert.Equal(l1, variances[1].ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[1].ParentVariance.PropertyValue2);
            Assert.Null(variances[1].ParentVariance.PropertyName);

            Assert.Null(variances[1].ParentVariance.ParentVariance);

            Assert.Equal("Bar", variances[2].PropertyValue1);
            Assert.Equal("Test", variances[2].PropertyValue2);
            Assert.Equal("Name", variances[2].PropertyName);

            Assert.NotNull(variances[2].ParentVariance);
            Assert.Equal(l1[1], variances[2].ParentVariance.PropertyValue1);
            Assert.Equal(l2[1], variances[2].ParentVariance.PropertyValue2);
            Assert.Equal("{Id=2}", variances[2].ParentVariance.PropertyName);

            Assert.NotNull(variances[2].ParentVariance.ParentVariance);
            Assert.Equal(l1, variances[2].ParentVariance.ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[2].ParentVariance.ParentVariance.PropertyValue2);
            Assert.Null(variances[2].ParentVariance.ParentVariance.PropertyName);
        }
Ejemplo n.º 18
0
        public void TwoDifferentDateTimesShouldReturnVariance()
        {
            // Arrange and Act
            DateTime now           = DateTime.Now;
            DateTime nowPlusOneDay = now.AddDays(1);

            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(now, nowPlusOneDay).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Null(variances[0].PropertyName);
            Assert.Equal(now, variances[0].PropertyValue1);
            Assert.Equal(nowPlusOneDay, variances[0].PropertyValue2);
            Assert.Equal(null, variances[0].ParentVariance);
        }
Ejemplo n.º 19
0
        public void EqualListOfIntsShouldReturnNoVariance()
        {
            // Arrange
            var list1 = new List <int> {
                1, 2, 3
            };
            var list2 = new List <int> {
                1, 2, 3
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(list1, list2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 20
0
        public void PrimitivesHolderWithTwoDifferenceShouldReturnTwoVariances()
        {
            // Arrange
            var c1 = new PrimitivesHolder
            {
                Int1  = 1,
                Char1 = 'e'
            };

            var c2 = new PrimitivesHolder
            {
                Int1  = 2,
                Char1 = 'a'
            };

            // Arrange
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(2, variances.Count);

            // First variance
            Assert.Equal(1, variances[0].PropertyValue1);
            Assert.Equal(2, variances[0].PropertyValue2);
            Assert.Equal("Int1", variances[0].PropertyName);

            // Parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(c1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Null(variances[0].ParentVariance.ParentVariance);

            // Second variance
            Assert.Equal('e', variances[1].PropertyValue1);
            Assert.Equal('a', variances[1].PropertyValue2);
            Assert.Equal("Char1", variances[1].PropertyName);

            // Parent
            Assert.NotNull(variances[1].ParentVariance);
            Assert.Equal(c1, variances[1].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[1].ParentVariance.PropertyValue2);
            Assert.Null(variances[1].ParentVariance.PropertyName);
            Assert.Null(variances[1].ParentVariance.ParentVariance);
        }
Ejemplo n.º 21
0
        public void TwoDifferentGuidsShouldReturnVariance()
        {
            // Arrange
            var guid1 = Guid.NewGuid();
            var guid2 = Guid.NewGuid();

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(guid1, guid2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Null(variances[0].PropertyName);
            Assert.Equal(guid1, variances[0].PropertyValue1);
            Assert.Equal(guid2, variances[0].PropertyValue2);
            Assert.Null(variances[0].ParentVariance);
        }
Ejemplo n.º 22
0
        public void ClassWithTwoDifferencesShouldReturnTwoVariances()
        {
            // Arrange
            var c1 = new MutableClass
            {
                Int1    = 1,
                String1 = "Tast"
            };

            var c2 = new MutableClass
            {
                Int1    = 2,
                String1 = "Test"
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(2, variances.Count);

            // First variance
            Assert.Equal("Int1", variances[0].PropertyName);
            Assert.Equal(1, variances[0].PropertyValue1);
            Assert.Equal(2, variances[0].PropertyValue2);

            // First's parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Equal(c1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.PropertyValue2);

            // Second variance
            Assert.Equal("String1", variances[1].PropertyName);
            Assert.Equal("Tast", variances[1].PropertyValue1);
            Assert.Equal("Test", variances[1].PropertyValue2);

            // Second's parent
            Assert.NotNull(variances[1].ParentVariance);
            Assert.Null(variances[1].ParentVariance.PropertyName);
            Assert.Equal(c1, variances[1].ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[1].ParentVariance.PropertyValue2);
            Assert.Null(variances[1].ParentVariance.ParentVariance);
        }
Ejemplo n.º 23
0
        public void PrimitivesHolderWithTwoDifferentStringsShouldReturnVariances()
        {
            // Arrange
            var l1 = new List <string> {
                "tast", "test"
            };
            var l2 = new List <string> {
                "t1st", "test"
            };
            var c1 = new PrimitivesHolder
            {
                Strings = l1
            };

            var c2 = new PrimitivesHolder
            {
                Strings = l2
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);

            // First variance
            Assert.Equal("tast", variances[0].PropertyValue1);
            Assert.Equal("t1st", variances[0].PropertyValue2);
            Assert.Equal("this[0]", variances[0].PropertyName);

            // First variance's parent's parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(l1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(l2, variances[0].ParentVariance.PropertyValue2);
            Assert.Equal("Strings", variances[0].ParentVariance.PropertyName);

            // First variance's parent's parent
            Assert.NotNull(variances[0].ParentVariance.ParentVariance);
            Assert.Equal(c1, variances[0].ParentVariance.ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.ParentVariance.PropertyName);
            Assert.Null(variances[0].ParentVariance.ParentVariance.ParentVariance);
        }
Ejemplo n.º 24
0
        public void CollectionClassContainingDifferentCollectionsShouldCompareUsingKeys()
        {
            // Arrange
            var c1 = new CollectionClass
            {
                Users = UserCollection1
            };

            var c2 = new CollectionClass
            {
                Users = UserCollection2
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 25
0
        public void UnequalArraysOfIntsShouldReturnNoVariance()
        {
            // Arrange
            var array1 = new[] { 1, 2, 4 };
            var array2 = new[] { 1, 2, 3 };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(array1, array2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Equal(4, variances[0].PropertyValue1);
            Assert.Equal(3, variances[0].PropertyValue2);

            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(array1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(array2, variances[0].ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.PropertyName);
            Assert.Null(variances[0].ParentVariance.ParentVariance);
        }
Ejemplo n.º 26
0
        public void ClassWithNullStringsShouldReturnNoVariance()
        {
            // Assert
            var c1 = new MutableClass
            {
                Int1    = 1,
                String1 = null
            };

            var c2 = new MutableClass
            {
                Int1    = 1,
                String1 = null
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 27
0
        public void ClassWithOneEmptyListShouldReturnVariance()
        {
            // Arrange
            var list1 = new List <int> {
                1, 2, 3
            };
            var list2 = Enumerable.Empty <int>();
            var c1    = new CollectionClass
            {
                Ints = list1
            };

            var c2 = new CollectionClass
            {
                Ints = list2
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.NotEmpty(variances);
            Assert.Equal(1, variances.Count);
            Assert.Equal("Ints.Count()", variances[0].PropertyName);
            Assert.Equal(3, variances[0].PropertyValue1);
            Assert.Equal(0, variances[0].PropertyValue2);

            // Parent
            Assert.NotNull(variances[0].ParentVariance);
            Assert.Equal(list1, variances[0].ParentVariance.PropertyValue1);
            Assert.Equal(list2, variances[0].ParentVariance.PropertyValue2);
            Assert.Equal("Ints", variances[0].ParentVariance.PropertyName);

            // Parent's parent
            Assert.NotNull(variances[0].ParentVariance.ParentVariance);
            Assert.Null(variances[0].ParentVariance.ParentVariance.PropertyName);
            Assert.Equal(c1, variances[0].ParentVariance.ParentVariance.PropertyValue1);
            Assert.Equal(c2, variances[0].ParentVariance.ParentVariance.PropertyValue2);
            Assert.Null(variances[0].ParentVariance.ParentVariance.ParentVariance);
        }
        public void DifferenceInPropertiesWithIgnoreVarianceAreIgnored()
        {
            // Arrange
            var u1 = new User
            {
                Age  = 10,
                Id   = 1,
                Name = "Rex"
            };
            var u2 = new User
            {
                Age  = 213,
                Id   = 1,
                Name = "Rex"
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(u1, u2).ToList();

            // Assert
            Assert.Empty(variances);
        }
        public void DifferenceInClassWithIgnoreVarianceAreIgnored()
        {
            // Arrange
            var c1 = new IgnoreVarianceClass
            {
                Id      = 201,
                IsHappy = false,
                Name    = "sdafsdf"
            };

            var c2 = new IgnoreVarianceClass
            {
                Id      = 1231,
                IsHappy = true,
                Name    = "dafsdsdaf"
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Assert
            Assert.Empty(variances);
        }
Ejemplo n.º 30
0
        public void ClassWithSameInnerClassContentsShouldReturnNoVariance()
        {
            // Arrange
            var c1 = new MutableClass
            {
                Int1       = 1,
                String1    = "test",
                Immutable1 = new ImmutableClass(2, "test2")
            };

            var c2 = new MutableClass
            {
                Int1       = 1,
                String1    = "test",
                Immutable1 = new ImmutableClass(2, "test2")
            };

            // Act
            List <ObjectVariance> variances = ObjectComparer.GetObjectVariances(c1, c2).ToList();

            // Arrange
            Assert.Empty(variances);
        }