Beispiel #1
0
        public void RollBackToStart()
        {
            var storage = new ValueHistory <int>();

            int maximumValue = 10;

            for (int i = 0; i < maximumValue; i++)
            {
                storage.Current = i;
                storage.StoreCurrent(new TimeMarker((ulong)(i + 1)));
            }

            storage.RollBackToStart();
            int storedValue = storage;

            Assert.AreEqual(0, storedValue);
        }
Beispiel #2
0
        public void RollBackToStartWithNoValues()
        {
            var storage = new ValueHistory <int>();

            Assert.DoesNotThrow(() => storage.RollBackToStart());
        }