public HierarchicalObjectViewModel AddItem(string name)
 {
     HierarchicalObjectViewModel item = new HierarchicalObjectViewModel();
     item.Name = name;
     HierarchicalObjects.Add(item);
     return item;
 }
        public HierarchicalObjectViewModel AddTreeItem(string name)
        {
            HierarchicalObjectViewModel treeitem = new HierarchicalObjectViewModel();
            treeitem.Name = name;
            TreeItemList.Add(treeitem);

            return treeitem;
        }
        void AddTestScripts(HierarchicalObjectViewModel model, List<TestScript> list)
        {
            foreach (TestScript obj in list)
            {
                HierarchicalObjectViewModel tmp = new HierarchicalObjectViewModel();
                tmp.Name = obj.Name;
                model.HierarchicalObjects.Add(tmp);

            }
        }
 void AddSanities(HierarchicalObjectViewModel model, List<Sanity> list)
 {
     foreach (Sanity obj in list)
     {
         HierarchicalObjectViewModel tmp = new HierarchicalObjectViewModel();
         tmp.Name = obj.Name;
         model.HierarchicalObjects.Add(tmp);
         AddTestScripts(tmp, obj.Scripts);
     }
 }