コード例 #1
0
        public void DetectsChangeInSubClass()
        {
            var person = new Person() {Address = new Address() {Postalcode = "1"}};

            var result = InstanceComparer.GetPropertiesThatDiffer(person).ToList();

            Assert.True(result.Count() == 1);
            Assert.True(result[0].Name == "Address");
        }
コード例 #2
0
        public void DetectsChangeArray()
        {
            var person = new Person();
            person.PhoneNumbers.Add(new PhoneNumber {Number = "1", Type = PhoneType.Home});

            var result = InstanceComparer.GetPropertiesThatDiffer(person).ToList();

            Assert.True(result.Count() == 1);
            Assert.True(result[0].Name == "PhoneNumbers");
        }