示例#1
0
 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));
 }
示例#2
0
        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);
        }
示例#3
0
 public TestResult GetFeatureResult(Feature feature)
 {
     CucumberObjects.Feature cucumberFeature = this.GetFeatureElement(feature);
     return(this.GetResultFromFeature(cucumberFeature));
 }