Exemplo n.º 1
0
        public void visitFork(ForkElement element, TestPosition position)
        {
            if (position.IsAncestorOf(_targetPosition))
            {
                try
                {
                    element.Action();
                }
                catch (Exception e)
                {
                    ReportError(position, e);
                }
            }

            while (position.Equals(_targetPosition))
            {
                _currentTestPosition = position;

                _runningLock.PassAndWaitForTurn();
            }

            _setupResultAccumulator.UnwindForPosition(_targetPosition, e => ReportError(TestPosition.At(0), e));
            _traceTracker.UnwindToPosition(_targetPosition);
        }
 public bool PositionIsAncestorOfContext(TestPosition position)
 {
     return(position.IsAncestorOf(_targetTestPosition));
 }