コード例 #1
0
ファイル: CommandLineTester.cs プロジェクト: rocketeerbkw/DNA
        /// <summary>
        /// This method setup up TestSetup object which runs the tests against the given files
        /// </summary>
        /// <returns>A flag that states whether or not the test produced an error or not</returns>
        public bool RunTests()
        {
            bool errors = false;
            TestSetup test = new TestSetup(this, _logtoFile, _errorsOnly, _xslt2);
            
            // Check to see if we are wanting to recursive scan down given folders
            if (_recursiveScan)
            {
                test.RecursiveScan = true;
            }

            if (test.ReadSetupFiles(_skinFile, _xmlFile))
            {
                test.RunTests();
            }
            errors = test.ErrorCount > 0;

            // Let them know if we've had errors
            return errors;
        }
コード例 #2
0
ファイル: SkinCheckerForm.cs プロジェクト: rocketeerbkw/DNA
        /// <summary>
        /// Sets up a TestSetup object and runs the tests passing in the given files and settings.
        /// This kicks off on a seperate thread so that the rest of the message queue can be updated
        /// while the tests are running.
        /// </summary>
        private void RunTestSuite()
        {
            _test = new TestSetup(this, logToFile.Checked, cbErrorOnly.Checked, cbXslt2.Checked);
            if (useSuppliedXML.Checked)
            {
                _test.UseXmlTestText = true;
                _test.XmlTestText = tbXMLInput.Text;
            }

            // Check to see if we are wanting to recursive scan down given folders
            if (cbRecursiveScan.Checked)
            {
                _test.RecursiveScan = true;
            }

            // Read the supplied files and run.
            if (_test.ReadSetupFiles(_skinFile, _xmlFile))
            {
                _splinterThread = new Thread(_test.RunTests);
                _splinterThread.Start();
            }
        }