Esempio n. 1
0
        public void PopMany()
        {
            var stack  = new StackState <DummyValue>();
            var values = CreateDummyValues(3);

            stack.Push(values);
            Assert.Equal(values.Reverse(), stack.Pop(3));
        }
Esempio n. 2
0
        public void PopManyReversed()
        {
            var stack  = new StackState <DummyValue>();
            var values = CreateDummyValues(3);

            stack.Push(values);
            Assert.Equal(values, stack.Pop(3, reversed: true));
        }
Esempio n. 3
0
        public void Pop()
        {
            var stack = new StackState <DummyValue>();
            var value = new DummyValue();

            stack.Push(value);
            Assert.Equal(value, stack.Pop());
        }