Ejemplo n.º 1
0
        public void Execution_Stack_Test_No_Access_To_Other_Thread()
        {
            var SUT = new ExecutionStack();

            SUT.ProcessEntry(1, Guid.NewGuid());
            Assert.IsTrue(SUT.IsStackEmpty(2));
            SUT.ClearStack();
        }
Ejemplo n.º 2
0
        public void Execution_Stack_Test_Add_Guid_Makes_Stack_Nonempty()
        {
            var SUT = new ExecutionStack();

            SUT.ProcessEntry(1, Guid.NewGuid());
            Assert.IsTrue(!SUT.IsStackEmpty(1));
            SUT.ClearStack();
        }
Ejemplo n.º 3
0
        public void Execution_Stack_Test_Clear_Stack()
        {
            var SUT = new ExecutionStack();

            SUT.ProcessEntry(1, Guid.NewGuid());
            SUT.ClearStack();
            Assert.IsTrue(SUT.IsStackEmpty(1));
        }
Ejemplo n.º 4
0
        public void Execution_Stack_Test_Method_Exception_Removes_Guid()
        {
            var SUT = new ExecutionStack();

            SUT.ProcessEntry(1, Guid.NewGuid());
            SUT.ProcessException(1);
            Assert.IsTrue(SUT.IsStackEmpty(1));
            SUT.ClearStack();
        }
Ejemplo n.º 5
0
        public void Execution_Stack_Test_Exit_On_Empty_Stack_Throws_Exception()
        {
            var SUT             = new ExecutionStack();
            var exceptionThrown = false;

            try
            {
                SUT.ProcessExit(1);
            }
            catch (ExecutionStackEmptyException ex)
            {
                exceptionThrown = true;
            }
            Assert.IsTrue(exceptionThrown);
            SUT.ClearStack();
        }