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"); }
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"); }