Beispiel #1
0
 public StringStep(string step, string source, int sourceLine)
 {
     Step = step;
     Source = source;
     SourceLine = sourceLine;
     StepResult = new StepResult(this, new Passed());
 }
 public override void AddActionStepResult(StepResult stepResult)
 {
     MergeResult(stepResult);
     var step = StepResults.FirstOrDefault(s => s.StringStep == stepResult.StringStep);
     if (step == null)
         base.AddActionStepResult(stepResult);
     else
         MergeStepResult(stepResult, step);
 }
Beispiel #3
0
 public void PendNotImplemented(string pendReason)
 {
     StepResult = new StepResult(this, new PendingNotImplemented(pendReason));
 }
Beispiel #4
0
 public void Pend(string reason)
 {
     StepResult = new StepResult(this, new Pending(reason));
 }
Beispiel #5
0
 public void PendNotImplemented(string pendReason)
 {
     StepResult = new StepResult(this, new PendingNotImplemented(pendReason));
 }
Beispiel #6
0
 public void PendBecauseOfPreviousFailedStep()
 {
     StepResult = new StepResult(this, new Skipped("Previous step has failed"));
 }
Beispiel #7
0
 public void Pend(string reason)
 {
     StepResult = new StepResult(this, new Pending(reason));
 }
 public BackgroundStepResult(string backgroundTitle, StepResult result)
     : base(result.StringStep, result.Result)
 {
     BackgroundTitle = backgroundTitle;
 }
 private static void MergeStepResult(StepResult stepResult, StepResult steptoMergeInto)
 {
     steptoMergeInto.MergeResult(stepResult.Result);
 }
Beispiel #10
0
 public virtual void AddActionStepResult(StepResult actionStepResult)
 {
     _actionStepResults.Add(actionStepResult);
     MergeResult(actionStepResult);
 }
Beispiel #11
0
        protected void MergeResult(StepResult actionStepResult)
        {
            var newResult = actionStepResult.Result;
            if (newResult is Failed)
            {
                _result = newResult;
                Fail(((Failed)newResult).Exception);
            }

            if (newResult is Pending && (_result is Failed == false))
            {
                _result = newResult;
                Pend(newResult.Message);
            }
        }
Beispiel #12
0
 public virtual void AddActionStepResult(StepResult actionStepResult)
 {
     _actionStepResults.Add(actionStepResult);
     MergeResult(actionStepResult);
 }
 public BackgroundStepResult(string backgroundTitle, StepResult result)
     : base(result.StringStep, result.Result)
 {
     BackgroundTitle = backgroundTitle;
 }
Beispiel #14
0
 public void PendBecauseOfPreviousFailedStep()
 {
     StepResult = new StepResult(this, new Skipped("Previous step has failed"));
 }
Beispiel #15
0
 public void Fail(Exception exception)
 {
     StepResult = new StepResult(this, new Failed(exception));
 }
Beispiel #16
0
 public void Fail(Exception exception)
 {
     StepResult = new StepResult(this, new Failed(exception));
 }
Beispiel #17
0
 private static void MergeStepResult(StepResult stepResult, StepResult steptoMergeInto)
 {
     steptoMergeInto.MergeResult(stepResult.Result);
 }