Exemple #1
0
        /// <summary>
        /// Gets the release object by release name
        /// </summary>
        /// <param name="releaseFolder">TDAPIOLELib.ReleaseFolder Object</param>
        /// <param name="releaseName">Name of the release</param>
        /// <returns></returns>
        public TDAPIOLELib.Release GetReleaseByName(TDAPIOLELib.ReleaseFolder releaseFolder, String releaseName)
        {
            TDAPIOLELib.ReleaseFactory releaseFactory = releaseFolder.ReleaseFactory;
            TDAPIOLELib.TDFilter       tDFilter       = releaseFactory.Filter;
            tDFilter["REL_NAME"] = releaseName;
            TDAPIOLELib.List list = tDFilter.NewList();

            if (list.Count == 1)
            {
                return(list[1] as TDAPIOLELib.Release);
            }

            return(null);
        }
Exemple #2
0
        /// <summary>
        /// Finds a Release Folder with name
        /// </summary>
        /// <param name="releaseFolder">TDAPIOLELib.ReleaseFolder Object</param>
        /// <param name="Name">Name of the folder to be serached</param>
        /// <returns>TDAPIOLELib.ReleaseFolder Object</returns>
        public TDAPIOLELib.ReleaseFolder GetChildFolderWithName(TDAPIOLELib.ReleaseFolder releaseFolder, String Name)
        {
            TDAPIOLELib.ReleaseFolderFactory releaseFolderFactory = releaseFolder.ReleaseFolderFactory;
            TDAPIOLELib.TDFilter             tDFilter             = releaseFolderFactory.Filter;
            tDFilter["RF_NAME"] = Name;

            TDAPIOLELib.List list = tDFilter.NewList();
            if (list.Count > 0)
            {
                return(list[1]);
            }
            else
            {
                return(null);
            }
        }
Exemple #3
0
 /// <summary>
 /// Counts tests under a test folder
 /// </summary>
 /// <param name="testFolder">Test Folder</param>
 /// <returns>Count of tests inside a test folder</returns>
 public int CountTestUnderFolder(TDAPIOLELib.TestFolder testFolder)
 {
     TDAPIOLELib.TestFactory testFactory = testFolder.TestFactory;
     TDAPIOLELib.TDFilter    tDFilter    = testFactory.Filter;
     return(tDFilter.NewList().Count);
 }