Esempio n. 1
0
 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);
 }
Esempio n. 2
0
 public int GetNumberOfDescendants(News item)
 {
     return(reader.GetNumberOfDescendants(item));
 }
Esempio n. 3
0
 public void CountDescendantsWithMultipleTiers_Success()
 {
     Assert.IsTrue(count.GetNumberOfDescendants(_news.ElementAt(0)) == 3);
 }