private TestResult GetResultFromScenario(CucumberObjects.Element cucumberScenario) { if (cucumberScenario == null) return TestResult.Inconclusive; bool wasSuccessful = CheckScenarioStatus(cucumberScenario); return wasSuccessful ? TestResult.Passed : TestResult.Failed; }
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; }
private TestResult GetResultFromFeature(CucumberObjects.Feature cucumberFeature) { if (cucumberFeature == null) return new TestResult { WasExecuted = false, WasSuccessful = false }; bool wasExecuted = true; bool wasSuccessful = cucumberFeature.elements.All(CheckScenarioStatus); return new TestResult { WasExecuted = wasExecuted, WasSuccessful = wasSuccessful }; }
private TestResult GetResultFromScenario(CucumberObjects.Element cucumberScenario) { if (cucumberScenario == null) return new TestResult { WasExecuted = false, WasSuccessful = false }; bool wasExecuted = true; bool wasSuccessful = CheckScenarioStatus(cucumberScenario); return new TestResult { WasExecuted = wasExecuted, WasSuccessful = wasSuccessful }; }
private static bool CheckScenarioStatus(CucumberObjects.Element cucumberScenario) { return cucumberScenario.steps.All(x => x.result.status == "passed"); }