/// <summary> /// Initializes a new instance of the <see cref="Step"/> class. /// </summary> /// <param name="scenario">The scenario container.</param> /// <param name="step">The step.</param> /// <param name="prefix"></param> public Step(Scenario scenario, Action step, StepPrefix prefix) { this.Scenario = scenario; this.Method = step; this.SetStepPrefix(prefix); this.State = StepState.NotRun; }
/// <summary> /// Initializes a new instance of the <see cref="ThenStep"/> class. /// </summary> /// <param name="scenario">The scenario container.</param> /// <param name="step">The step.</param> /// <param name="prefix"></param> internal ThenStep(Scenario scenario, Action step, StepPrefix prefix) : base(scenario, step, prefix) { this.Scenario.AddStep(this); }
protected void I_create_an_instance() { scenario = TestScenario(); scenario.Name = "Test scenario"; viewModel = new ScenarioViewModel(scenario); }
/// <summary> /// Called when a scenario ends /// </summary> /// <param name="scenario">The scenario.</param> private void OnScenarioEnd(Scenario scenario) { if (this.ScenarioEnd != null) { this.ScenarioEnd(scenario); } }
/// <summary> /// Called when a scenario begins /// </summary> /// <param name="scenario">The scenario.</param> private void OnScenarioBegin(Scenario scenario) { if(this.ScenarioBegin !=null) { this.ScenarioBegin(scenario); } }
/// <summary> /// Initializes a new instance of the <see cref="ScenarioViewModel"/> class. /// </summary> /// <param name="scenario">The scenario.</param> public ScenarioViewModel(Scenario scenario) { this.Scenario = scenario; this.ScenarioName = scenario.Name; this.Steps = new ObservableCollection<StepViewModel>(scenario.Steps.Select(s => new StepViewModel(s))); }