public void Checkpoint_not_equal_after_value_has_changed() { // ARRANGE var left = new Changeable <string> { Data = "a" }; var checkpoint = left.Flatten().ToArray(); left.Data = "b"; // ACT var result = left.DeepCompare(checkpoint); // ASSERT Assert.False(result.AreEqual); Assert.Equal(left.PropertyPath(l => l.Data).ToString(), result.Different.Values.Single()); }
public void Checkpoint_not_equal_after_array_item_was_added() { // ARRANGE var left = new Changeable <string[]> { Data = new[] { "a" } }; var checkpoint = left.Flatten().ToArray(); left.Data = new[] { "a", "b" }; // ACT var result = left.DeepCompare(checkpoint); // ASSERT Assert.False(result.AreEqual); Assert.Equal(left.PropertyPath(l => l.Data[1]).ToString(), result.Missing.Right.Single()); }