public List <News> GroupByDepartment() { foreach (News item in _news) { item.Departments.AddRange(_news.FindAll(x => item.Oid == x.DepartmentParent_OID)); item.NumDecendants = countingDecorator.GetNumberOfDescendants(item); } return(_news); }
public int GetNumberOfDescendants(News item) { return(reader.GetNumberOfDescendants(item)); }
public void CountDescendantsWithMultipleTiers_Success() { Assert.IsTrue(count.GetNumberOfDescendants(_news.ElementAt(0)) == 3); }