public ScenarioContext(TGiven given, TWhen when, TThen then, ScenarioOutput output) { Given = given; When = when; Then = then; Output = output; }
public void StepSkipped_Logs_Into_Output() { //arrange. var output = new Mock <ITestOutputHelper>(); var stepText = "Given something 123"; var sut = new ScenarioOutput(output.Object); //act. sut.StepSkipped(stepText); //assert. output.Verify(o => o.WriteLine($"{stepText}: SKIPPED"), Times.Once); }
protected FeatureWhen(ScenarioOutput output, TGiven given) : base(output) { Given = given; }
public ValuesFeatureWhen(ScenarioOutput output, ValuesFeatureGiven given, ValuesApiFixture valuesApiFixture) : base(output, given) { _valuesApiFixture = valuesApiFixture; }
protected FeatureGiven(ScenarioOutput output) : base(output) { }
protected FeatureGivenWhenThen(ScenarioOutput output) { Output = output; }
void MatchScenario(ScenarioOutput o, IConcreteScenario svm) { var failure = o.FailureElement; string exceptionType = null; string failureMessage = null; var result = MapResult(o.Result); if (failure != null) { exceptionType = (string) failure.Attribute("exception-type"); if (exceptionType == "TechTalk.SpecFlow.SpecFlowException") { result = Status.Pending; } failureMessage = string.Format("{0}: {1}\n{2}", exceptionType, (string) failure.Element("message"), (string) failure.Element("stack-trace")); } svm.Status = result; svm.FailureMessage = failureMessage; var output = ParseOutput(o.Output); foreach (var stepOutcome in output) { var step = svm.Steps.FirstOrDefault(x => x.FormattedScenarioBlock +" "+ x.FormattedText == stepOutcome.Key); if (step != null) { var so = stepOutcome.Value; step.Status = so.Result; step.ErrorMessage = so.ErrorMessage; step.FullErrorMessage = so.FullErrorMessage; } } }
public BasicExampleFeatureGiven(ScenarioOutput output) : base(output) { }
public ValuesFeatureThen(ScenarioOutput output, ValuesFeatureGiven given, ValuesFeatureWhen when) : base(output, given, when) { }
protected FeatureThen(ScenarioOutput output, TGiven given, TWhen when) : base(output) { Given = given; When = when; }
public BasicExampleFeatureThen(ScenarioOutput output, BasicExampleFeatureGiven given, BasicExampleFeatureWhen when) : base(output, given, when) { }
public ValuesFeatureGiven(ScenarioOutput output, IFixture fixture) : base(output) { _fixture = fixture; }