Exemplo n.º 1
0
        public RunTestsForm(ref dao.QATestCollection tests, IMap map, TransactionManager tm, QAManager qa)
        {
            //
            // Required for Windows Form Designer support
            //
            InitializeComponent();

            if (tests == null)
                throw new ArgumentNullException("tests", "Must pass collection of QA tests to RunTestsForm");
            if (tests.Count == 0)
                throw new ArgumentException("No QA tests passed to RunTestsForm", "tests");
            if (map == null)
                throw new ArgumentNullException("map", "Must pass the focus map to RunTestsForm");

            this._tests = tests;
            this._tm = tm;
            this._qa = qa;
            this._map = map;
            this._defaults = new util.SystemDefaults();

            // Throw TM stuff at the QA tests and see if it sticks
            if (tm.Current() != null)
            {
                object[] theArgs = new object[2] {
                                                 new ISDUTLib.tm.dao.EditsDAO((IFeatureWorkspace)tm.Current().PGDBConnection, tm.transactionConfig()),
                                                 tm.transactionConfig()
                                             };
                for (int i = 0; i < this._tests.Count; i++)
                {
                    this._tests.get_Test(i).Test.UserData = theArgs;
                }
            }
        }