public TestResult GetScenarioResult(Scenario scenario) { CucumberObjects.Element cucumberScenario = null; CucumberObjects.Feature cucumberFeature = this.GetFeatureElement(scenario.Feature); if (cucumberFeature != null) { cucumberScenario = cucumberFeature.elements.FirstOrDefault(x => x.name == scenario.Name); } return(this.GetResultFromScenario(cucumberScenario)); }
private TestResult GetResultFromFeature(CucumberObjects.Feature cucumberFeature) { if (cucumberFeature == null || cucumberFeature.elements == null) { return(TestResult.Inconclusive); } bool wasSuccessful = cucumberFeature.elements.All(CheckScenarioStatus); return(wasSuccessful ? TestResult.Passed : TestResult.Failed); }
public TestResult GetFeatureResult(Feature feature) { CucumberObjects.Feature cucumberFeature = this.GetFeatureElement(feature); return(this.GetResultFromFeature(cucumberFeature)); }