List <ITreeViewItem> ITreeViewItem.Childrens()
        {
            CurrentChildrens = new List <ITreeViewItem>();

            // get the sub items for the root here and return list of Childrens
            // Step #1 add sub folder of current folder
            List <string> strParentFolders = QCConnect.GetTestLabExplorer(Path);

            //Add QC folders to tree children

            foreach (string sFolder in strParentFolders)
            {
                QCTestLabFolderTreeItem pfn = new QCTestLabFolderTreeItem();
                pfn.Folder = sFolder;
                pfn.Path   = Path + @"\" + sFolder;
                CurrentChildrens.Add(pfn);
            }

            // Step #2 add folder Test Set list
            List <QCTestSetSummary> sTestSets = QCConnect.GetTestSetExplorer(Path);

            foreach (QCTestSetSummary tsItem in sTestSets)
            {
                tsItem.TestSetStatuses = new List <string[]>();
                QCTestSetTreeItem pfn = new QCTestSetTreeItem();
                pfn.TestSetID   = tsItem.TestSetID.ToString();
                pfn.TestSetName = tsItem.TestSetName;
                pfn.Path        = Path + @"\" + tsItem.TestSetName;
                QCTestSetSummary tsItemStatus = QCConnect.GetTSRunStatus(tsItem);
                pfn.TestSetStatuses = tsItem.TestSetStatuses;
                //if (IsAutomated(pfn.TestSetID)) pfn.Automated = true; else pfn.Automated = false;
                //IsTestSetAlreadyImported(pfn);
                pfn.IsTestSetAlreadyImported();
                CurrentChildrens.Add(pfn);
            }

            return(CurrentChildrens);
        }
Exemple #2
0
 public override List <string> GetTestLabExplorer(string path)
 {
     return(QCConnect.GetTestLabExplorer(path));
 }