public virtual void ProcessorStateTestPeekEmpty()
 {
     NUnit.Framework.Assert.That(() => {
         ProcessorState testProcessorState = new ProcessorState();
         testProcessorState.Pop();
     }
                                 , NUnit.Framework.Throws.InstanceOf <InvalidOperationException>())
     ;
 }
        public virtual void ProcessorStateTestPop()
        {
            ProcessorState   testProcessorState = new ProcessorState();
            ISvgNodeRenderer renderer           = new DummySvgNodeRenderer("test");

            testProcessorState.Push(renderer);
            ISvgNodeRenderer popped = testProcessorState.Pop();

            NUnit.Framework.Assert.IsTrue(popped.ToString().Equals("test") && testProcessorState.Empty());
        }
        public virtual void ProcessorStateTestPushSameElementTwice()
        {
            ProcessorState   testProcessorState = new ProcessorState();
            ISvgNodeRenderer rendererOne        = new DummySvgNodeRenderer("test01");

            testProcessorState.Push(rendererOne);
            testProcessorState.Push(rendererOne);
            ISvgNodeRenderer popped = testProcessorState.Pop();
            bool             result = popped.ToString().Equals("test01");

            result = result && testProcessorState.Top().ToString().Equals("test01");
            NUnit.Framework.Assert.IsTrue(result);
        }
        public virtual void ProcessorStateTestMultiplePushesPopAndPeek()
        {
            ProcessorState   testProcessorState = new ProcessorState();
            ISvgNodeRenderer rendererOne        = new DummySvgNodeRenderer("test01");

            testProcessorState.Push(rendererOne);
            ISvgNodeRenderer rendererTwo = new DummySvgNodeRenderer("test02");

            testProcessorState.Push(rendererTwo);
            ISvgNodeRenderer popped = testProcessorState.Pop();
            bool             result = popped.ToString().Equals("test02");

            result = result && testProcessorState.Top().ToString().Equals("test01");
            NUnit.Framework.Assert.IsTrue(result);
        }