public void Setup() { StackUnderTest = new ProcessingStack <string, StateInfo>(); StackUnderTest.Push("good bye", StateInfo.PUSHED); StackUnderTest.Push("middle", StateInfo.PUSHED); StackUnderTest.Push("hello", StateInfo.PUSHED); }
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); }
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); }
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); }
public void Setup() { StackUnderTest = new ProcessingStack<string, StateInfo>(); StackUnderTest.Push("good bye", StateInfo.PUSHED); StackUnderTest.Push("middle", StateInfo.PUSHED); StackUnderTest.Push("hello", StateInfo.PUSHED); }