Пример #1
0
        public void PopTest()
        {
            var sut = new StackVisitor <int>();

            sut.SetElements(7, 9, 1);

            PopAndAssert(sut, 1);
            PopAndAssert(sut, 9);
            PopAndAssert(sut, 7);
        }
Пример #2
0
        public void PushTest()
        {
            var sut = new StackVisitor <int>();

            sut.Push(7);
            sut.Push(9);
            sut.Push(1);

            var elements = sut.GetElements();
            var expected = new List <int>
            {
                1, 9, 7
            };

            elements.Should().BeEquivalentTo(expected, options => options.WithStrictOrdering());
        }
Пример #3
0
        public void Visit()
        {
            var v = new StackVisitor();

            Visitor.Visit(ref v, memory);
        }