private void UpdateTestStatusRecursive(Test test) { test.LogContext().GetAllItems().ForEach(x => UpdateStatus(x.Status)); if (test.HasChildren()) { test.NodeContext().GetAllItems().ForEach(x => UpdateTestStatusRecursive(x)); } if (!test.IsBehaviorDrivenType) { // if not all children are marked SKIP, then: // ensure the parent has a status that is not SKIP if (this.Status == Status.Skip && test.NodeContext().GetAllItems().Any(x => x.Status != Status.Skip)) { // reset status Status = Status.Pass; // compute new status test.NodeContext().GetAllItems() .Where(x => x.Status != Status.Skip) .ToList() .ForEach(x => UpdateTestStatusRecursive(x)); } } }
private void UpdateTestStatusRecursive(Test test) { test.LogContext().GetAllItems().ForEach(x => UpdateStatus(x.Status)); if (test.HasChildren()) { test.NodeContext().GetAllItems().ForEach(x => UpdateTestStatusRecursive(x)); } }