private static void SetResultsForIndividualScenariosUnderFeature(FeatureNode featureTreeNode, ITestResults testResults) { foreach (var featureElement in featureTreeNode.Feature.FeatureElements) { var scenario = featureElement as Scenario; if (scenario != null) { featureElement.Result = testResults.GetScenarioResult(scenario); continue; } var scenarioOutline = featureElement as ScenarioOutline; if (scenarioOutline != null) { foreach (var example in scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows)) { example.Result = testResults.GetExampleResult(scenarioOutline, example.Cells.ToArray()); } scenarioOutline.Result = scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows) .Select(row => row.Result) .Merge(); } } }
private static void SetResultsForIndividualScenariosUnderFeature(FeatureNode featureTreeNode, ITestResults testResults) { foreach (var featureElement in featureTreeNode.Feature.FeatureElements) { var scenario = featureElement as Scenario; if (scenario != null) { featureElement.Result = testResults.GetScenarioResult(scenario); continue; } var scenarioOutline = featureElement as ScenarioOutline; if (scenarioOutline != null) { if (testResults.SupportsExampleResults) { foreach (var example in scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows)) { example.Result = testResults.GetExampleResult(scenarioOutline, example.ToArray()); } scenarioOutline.Result = scenarioOutline.Examples.SelectMany(e => e.TableArgument.DataRows).Select(row => row.Result).Merge(); } else { featureElement.Result = testResults.GetScenarioOutlineResult(scenarioOutline); } continue; } } }