Beispiel #1
0
        public TestManagerForm(ISDUTExtension ext, ref QATestCollection tests, string[] businessNames)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            // Store the collection
            this._ext = ext;
            this._tests = tests;
            this._bizNames = businessNames;
        }
Beispiel #2
0
        /**
         * Loads a collection the QA test objects. Returns the collection of tests. Null indicates an error.
         * Passing an empty or null operationalArea will return all QA tests
         */
        private QATestCollection LoadTests(string operationalArea)
        {
            QATestCollection theTestColl = null;

            // no longer stored in the DB. Need to store either in local PGDB, or hard-code
            try
            {
                string path = Extension.get_SystemValue(DAOUtils.ISDUT_SEE_TEMP);

                IWorkspaceFactory workspaceFactory = new ESRI.ArcGIS.DataSourcesGDB.FileGDBWorkspaceFactoryClass();
                IWorkspace theIsdutWorkspace = workspaceFactory.OpenFromFile(path, 0);

                if (theIsdutWorkspace != null)
                {
                    util.IsdutHourGlass theHourGlass = new ISDUTLib.util.IsdutHourGlass(this._app);

                    try
                    {
                        theHourGlass.start("Loading QA test information");
                        theTestColl = new QATestCollection(theIsdutWorkspace, operationalArea);
                    }
                    catch (util.PermissionsException pex)
                    {
                        util.Logger.Write("qa.QAManager::LoadTests - Exception thrown reading permissions on QA config tables."
                            + Environment.NewLine + pex.Message + Environment.NewLine + pex.ToString(), util.Logger.LogLevel.Warn);
                    }
                    catch (Exception ex)
                    {
                        util.Logger.Write("qa.QAManager::LoadTests - Failed to open database connection to QA config tables."
                            + Environment.NewLine + ex.Message + Environment.NewLine + ex.ToString(), util.Logger.LogLevel.Warn);
                    }
                    finally
                    {
                        theHourGlass.end();
                    }
                }
            }
            catch (Exception e)
            {
                MessageBox.Show("An error has occured loading the QA tests and defaults. " + e.Message);
                Logger.Write(e);
            }

            return theTestColl;
        }
Beispiel #3
0
        internal void set_QATests(QATestCollection tests)
        {
            if (tests != null)
            {
                this._tests = new QATestCollection(tests.CanRead, tests.CanWrite);

                for (int i = 0; i < tests.Count; i++)
                {
                    QATest theTest = tests.get_Test(i);
                    bool bAcceptTest = true;
                    if (this._operationalAreaForLoadedTests.Length > 0)
                        bAcceptTest = this._operationalAreaForLoadedTests.Equals("");

                    if (bAcceptTest)
                        this._tests.Add(theTest);
                }
            }
            else
            {
                this._tests = null;
            }
        }
Beispiel #4
0
        internal QATestCollection get_QATests()
        {
            // Load the tests
            this._operationalAreaForLoadedTests = "";
            this._tests = this.LoadTests("");

            return this._tests;
        }