private static void StepEnd(Step step) { switch (step.State) { case StepState.Failed: WriteLine("Failed: " + step.Exception.Message, 012); break; case StepState.Passed: WriteLine(Enum.GetName(typeof(StepState), step.State), 010); break; case StepState.Skipped: WriteLine(Enum.GetName(typeof(StepState), step.State), 014); break; } }
/// <summary> /// Adds a step. /// </summary> /// <param name="givenStep">The given step.</param> internal virtual void AddStep(Step givenStep) { this.Steps.Add(givenStep); }
/// <summary> /// Initializes a new instance of the <see cref="StepViewModel"/> class. /// </summary> /// <param name="step">The step.</param> public StepViewModel(Step step) { this.StepName = step.Label; }
protected void I_create_an_instance() { step = GetDummyStep(); viewModel = new StepViewModel(step); }
/// <summary> /// Called when the step ends /// </summary> /// <param name="step">The step.</param> private void OnStepEnd(Step step) { if (this.StepEnd != null) { this.StepEnd(step); } }
/// <summary> /// Called when the step begins /// </summary> /// <param name="step">The step.</param> private void OnStepBegin(Step step) { if(this.StepBegin != null) { this.StepBegin(step); } }