public void TestReverseModify() { var diff = new PointDiff() { Index = 0, Operation = Operation.Modify, Value = new CoordinateDelta() { X = -0.01 } }; var reversed = (PointDiff)diff.Reverse(); Assert.AreEqual(0, reversed.Index); Assert.AreEqual(Operation.Modify, reversed.Operation); Assert.AreEqual(0.01, reversed.Value.X); }
public void TestReverseDelete() { var diff = new PointDiff() { Index = 0, Operation = Operation.Delete, Value = new CoordinateDelta() { X = 1, Y = 2 } }; var reversed = (PointDiff)diff.Reverse(); Assert.AreEqual(0, reversed.Index); Assert.AreEqual(Operation.Insert, reversed.Operation); Assert.AreEqual(1, reversed.Value.X); Assert.AreEqual(2, reversed.Value.Y); }