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)); } }
private void AddNodeAttributes(Test node) { if (node.HasCategory()) { node.CategoryContext().GetAllItems().ForEach(c => _testAttrCategoryContext.AddAttributeContext((Category)c, node)); } if (node.HasAuthor()) { node.AuthorContext().GetAllItems().ForEach(a => _testAttrAuthorContext.AddAttributeContext((Author)a, node)); } if (node.HasChildren()) { node.NodeContext().GetAllItems().ForEach(n => AddNodeAttributes(n)); } }