示例#1
0
 public void Setup()
 {
     StackUnderTest = new ProcessingStack <string, StateInfo>();
     StackUnderTest.Push("good bye", StateInfo.PUSHED);
     StackUnderTest.Push("middle", StateInfo.PUSHED);
     StackUnderTest.Push("hello", StateInfo.PUSHED);
 }
示例#2
0
        private void InitializeConfig()
        {
            var frame = new ProcessingFrame
            {
                Rectangle = new DRect
                {
                    X      = RgSettings.X1,
                    Y      = RgSettings.Y1,
                    Width  = RgSettings.W,
                    Height = RgSettings.H
                }
            };

            _stack.Push(frame);
        }
示例#3
0
        private void InitializeConfig()
        {
            var frame = new ProcessingFrame
            {
                Rectangle = new DRect
                {
                    X      = -1.0,
                    Y      = -1.0,
                    Width  = 2.0,
                    Height = 2.0
                }
            };

            _stack.Push(frame);
        }
示例#4
0
        public void ProcessingStack_ExceedInitialStackCapacity_Test()
        {
            int testVolume = ProcessingStack <string, StateInfo> .DEFAULT_SIZE * 2;

            while (StackUnderTest.StackDepth < testVolume)
            {
                StackUnderTest.Push(string.Format("Padding {0}", StackUnderTest.StackDepth), StateInfo.PUSHED);
            }

            for (int i = testVolume; i > 0; i--)
            {
                Assert.AreNotEqual(StateInfo.ERROR, StackUnderTest.StackTop_Step);
                Console.WriteLine("Stack Value: " + StackUnderTest.StackTop_Item);
                StackUnderTest.Pop();
            }

            Assert.AreEqual(StateInfo.ERROR, StackUnderTest.StackTop_Step);
            Assert.IsTrue(StackUnderTest.Empty);
        }
示例#5
0
 public void Setup()
 {
     StackUnderTest = new ProcessingStack<string, StateInfo>();
     StackUnderTest.Push("good bye", StateInfo.PUSHED);
     StackUnderTest.Push("middle", StateInfo.PUSHED);
     StackUnderTest.Push("hello", StateInfo.PUSHED);
 }