Ejemplo n.º 1
0
        public void It_should_capture_predefined_step_types()
        {
            _runner.Test().TestScenario(
                TestStep.CreateWithTypeAsync("setup", Some_step),
                TestStep.CreateWithTypeAsync("setup", Some_step),
                TestStep.CreateWithTypeAsync("given", Some_step),
                TestStep.CreateWithTypeAsync("given", Some_step),
                TestStep.CreateWithTypeAsync("when", Some_step),
                TestStep.CreateWithTypeAsync("when", Some_step),
                TestStep.CreateWithTypeAsync("then", Some_step),
                TestStep.CreateWithTypeAsync("then", Some_step),
                TestStep.CreateWithTypeAsync("something else", Some_step),
                TestStep.CreateWithTypeAsync("something else", Some_step)
                );

            var steps = _feature.GetFeatureResult().GetScenarios().Single().GetSteps();

            StepResultExpectation.AssertEqual(steps,
                                              new StepResultExpectation(1, 10, "SETUP Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(2, 10, "AND Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(3, 10, "GIVEN Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(4, 10, "AND Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(5, 10, "WHEN Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(6, 10, "AND Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(7, 10, "THEN Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(8, 10, "AND Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(9, 10, "SOMETHING ELSE Some step", ExecutionStatus.Passed),
                                              new StepResultExpectation(10, 10, "AND Some step", ExecutionStatus.Passed)
                                              );
        }