public void InheritanceWithVirtualCallsTest()
        {
            TrackedObjectWithVirtualDerived to = new TrackedObjectWithVirtualDerived();

            to.ChangeValues(1, 2, 3, 4);
            to.ChangeValues(5, 6, 7, 8);
            to.ChangeValues(9, 10, 11, 12);

            var sot = (ITrackedObject)to;

            sot.Tracker.Undo();

            Assert.AreEqual(5, to.P1);
            Assert.AreEqual(6, to.P2);
            Assert.AreEqual(7, to.AP1);
            Assert.AreEqual(8, to.VP1);

            sot.Tracker.Undo();

            Assert.AreEqual(1, to.P1);
            Assert.AreEqual(2, to.P2);
            Assert.AreEqual(3, to.AP1);
            Assert.AreEqual(4, to.VP1);

            sot.Tracker.Redo();

            Assert.AreEqual(5, to.P1);
            Assert.AreEqual(6, to.P2);
            Assert.AreEqual(7, to.AP1);
            Assert.AreEqual(8, to.VP1);
        }
        public void InheritanceWithVirtualCallsTest()
        {
            TrackedObjectWithVirtualDerived to = new TrackedObjectWithVirtualDerived();

            to.ChangeValues(1, 2, 3, 4);
            to.ChangeValues(5, 6, 7, 8);
            to.ChangeValues(9, 10, 11, 12);

            var sot = (ITrackedObject)to;

            sot.Tracker.Undo();

            Assert.AreEqual(5, to.P1);
            Assert.AreEqual(6, to.P2);
            Assert.AreEqual(7, to.AP1);
            Assert.AreEqual(8, to.VP1);

            sot.Tracker.Undo();

            Assert.AreEqual(1, to.P1);
            Assert.AreEqual(2, to.P2);
            Assert.AreEqual(3, to.AP1);
            Assert.AreEqual(4, to.VP1);

            sot.Tracker.Redo();

            Assert.AreEqual(5, to.P1);
            Assert.AreEqual(6, to.P2);
            Assert.AreEqual(7, to.AP1);
            Assert.AreEqual(8, to.VP1);
        }