Пример #1
0
        /// <summary>
        /// Runs the test case until the step provided is encountered
        /// This does not execute the corresponding step.
        /// </summary>
        /// <param name="Item"></param>
        public void RunUntilTime(double targetTime)
        {
            while (EventTimeLine.CurrentTime < targetTime)
            {
                SubStep subStep = null;
                if (ActiveBlockingExpectations().Count == 0)
                {
                    NextSubStep();
                    subStep = CurrentSubStep();
                    if (subStep != null)
                    {
                        SetupSubStep(subStep);
                    }
                }

                if (subStep == null || !subStep.getSkipEngine())
                {
                    Cycle();
                }
                else
                {
                    EventTimeLine.CurrentTime += Step;
                }
            }
        }
Пример #2
0
        /// <summary>
        /// Performs a single step
        /// </summary>
        public void StepOnce()
        {
            SubStep subStep = null;

            if (ActiveBlockingExpectations().Count == 0)
            {
                // When no blocking expectation, one can execute the next substep
                subStep = CurrentSubStep();
                if (EventTimeLine.ContainsSubStep(subStep))
                {
                    NextSubStep();
                    subStep = CurrentSubStep();
                }

                SetupSubStep(subStep);
            }

            if (subStep == null)
            {
                Cycle();
            }
            else if (!subStep.getSkipEngine())
            {
                Cycle();
            }
            else
            {
                CheckExpectationsState(acceptor.RulePriority.aCleanUp);
                NextCycle();
            }
        }