public void ShouldBeAbleToTakeASnapshot()
        {
            var items = new List <object> {
                1, 2
            };
            var tokenizableStreamBase = new TokenizableStreamBase <object>(() => items);

            Assert.AreEqual(1, tokenizableStreamBase.Current);
            tokenizableStreamBase.TakeSnapshot();
            Assert.AreEqual(1, tokenizableStreamBase.Current);
            tokenizableStreamBase.Consume();
            Assert.AreEqual(2, tokenizableStreamBase.Current);
        }
        public void ShouldBeAbleToRollbackASnapshotAfterTheLastItemHasBeenConsumed()
        {
            var items = new List <object> {
                1, 2
            };
            var tokenizableStreamBase = new TokenizableStreamBase <object>(() => items);

            Assert.AreEqual(1, tokenizableStreamBase.Current);
            tokenizableStreamBase.TakeSnapshot();
            tokenizableStreamBase.Consume();
            tokenizableStreamBase.Consume();
            tokenizableStreamBase.Consume();
            Assert.IsTrue(tokenizableStreamBase.IsAtEnd());
            tokenizableStreamBase.RollbackSnapshot();
            Assert.AreEqual(1, tokenizableStreamBase.Current);
        }