public void EndIsolationScope()
{
CleanupCurrentLevel();
_currentIsolationLevel = _isolationLevels.Pop();
}
public void CanAddCleanupActionAfterOneLevelWasPoppoed() { var context = new TestExecutionScopesManager("dummy", Functions.EmptyAction<IIsolationScope>()); context.BeginIsolationScope("Level1", Functions.EmptyAction<IIsolationScope>()); context.EndIsolationScope(); var cleanupCalled = false; context.AddCleanupAction(() => cleanupCalled = true); context.EndIsolationScope(); Assert.IsTrue(cleanupCalled, "Cleanup action hasn't been called"); }