public void Execution_Stack_Test_Exiting_Method_Removes_Guid() { var SUT = new ExecutionStack(); SUT.ProcessEntry(1, Guid.NewGuid()); SUT.ProcessExit(1); Assert.IsTrue(SUT.IsStackEmpty(1)); SUT.ClearStack(); }
public void Execution_Stack_Test_Check_Equality_Of_Mult_Pushed_Methods() { var SUT = new ExecutionStack(); var g1 = Guid.NewGuid(); var g2 = Guid.NewGuid(); SUT.ProcessEntry(1, g1); SUT.ProcessEntry(1, g2); Assert.IsTrue(SUT.ExecutingGuid(1) == g2); SUT.ProcessExit(1); Assert.IsTrue(SUT.ExecutingGuid(1) == g1); }
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(); }