Beispiel #1
0
        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);
        }
Beispiel #2
0
        public static IScenarioStep Given(Action initialStateSetupMethod)
        {
            var scenarioRunner = new ScenarioRunner();

            scenarioRunner.AddStep("Given", initialStateSetupMethod);
            return(scenarioRunner);
        }
Beispiel #3
0
 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
 }
Beispiel #4
0
 private void AddStepMethod(StepType stepType, Action action)
 {
     _scenarioRunner.AddStep(new StepMethodInvoker(stepType, action.Method));
 }
Beispiel #5
0
 void AddStepMethod(StepType stepType, Action action)
 {
     _scenarioRunner.AddStep(new StepMethodInvoker(stepType, action.GetMethodInfo()));
 }