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