public virtual void Line(ILineExecution execution)
        {
            if (!_context.CanContinue())
            {
                return;
            }

            execution.Execute(_context);
        }
        public virtual void Line(ILineExecution execution)
        {
            if (!_context.CanContinue())
            {
                return;
            }

            // TODO -- shouldn't throw exceptions, but you know I'll slip up so try/catch here.
            execution.Execute(_context);
        }
示例#3
0
        public void Composite(ICompositeExecution execution)
        {
            foreach (var executionStep in execution.Steps)
            {
                if (!_context.CanContinue())
                {
                    break;
                }

                executionStep.AcceptVisitor(this);
            }
        }
示例#4
0
        public static void RunAll(SpecContext context, SpecificationPlan plan)
        {
            var gatherer = new LineStepGatherer(context);
            plan.AcceptVisitor(gatherer);

            foreach (var line in gatherer.Lines)
            {
                if (!context.CanContinue()) break;

                line.Execute(context);
            }
        }
        public static IEnumerable <PerfRecord> RunAll(SpecContext context, SpecificationPlan plan)
        {
            var gatherer = new LineStepGatherer(context);

            plan.AcceptVisitor(gatherer);

            context.Timings.Start(plan.Specification);

            foreach (var line in gatherer.Lines)
            {
                if (!context.CanContinue())
                {
                    break;
                }

                line.Execute(context);
            }

            return(context.FinalizeResults(1).Performance);
        }
示例#6
0
 public void just_starting_with_default_options()
 {
     theContext.CanContinue().ShouldBe(true);
 }
 protected bool shouldStop(SpecContext context)
 {
     return(Request.IsCancelled || !context.CanContinue() || _timeout.IsCompleted);
 }
示例#8
0
 protected bool shouldStop(SpecContext context)
 {
     return Request.IsCancelled || !context.CanContinue() || _timeout.IsCompleted;
 }