public static IScenarioStep Given <T1, T2>(Action <T1, T2> initialStateSetupMethod, T1 param1, T2 param2) { var scenarioRunner = new ScenarioRunner(); scenarioRunner.AddStep("Given", initialStateSetupMethod, param1, param2); return(scenarioRunner); }
public static IScenarioStep Given(Action initialStateSetupMethod) { var scenarioRunner = new ScenarioRunner(); scenarioRunner.AddStep("Given", initialStateSetupMethod); return(scenarioRunner); }
public virtual void SetupScenario() { _reportTarget = CreateReportTarget(); _scenarioRunner = new ScenarioRunner(this, _reportTarget); foreach (var step in ScenarioMapper.GetStepInvokers(this)) { _scenarioRunner.AddStep(step); } _scenarioRunner.ReportScenario(); _scenarioRunner.RunGivens(); _scenarioRunner.RunWhen(); _scenarioRunner.EnsureAtLeastOneThenExists(); //thens are executed by NUnit }
private void AddStepMethod(StepType stepType, Action action) { _scenarioRunner.AddStep(new StepMethodInvoker(stepType, action.Method)); }
void AddStepMethod(StepType stepType, Action action) { _scenarioRunner.AddStep(new StepMethodInvoker(stepType, action.GetMethodInfo())); }