Ejemplo n.º 1
0
        /// <summary>
        /// When overridden in the derived class, runs the test.
        /// </summary>
        /// <param name="errorMessage">When the method returns false, contains an error message as to why
        /// the test failed. Otherwise, contains an empty string.</param>
        /// <returns>
        /// True if the test passed; false if the test failed.
        /// </returns>
        protected override bool RunTest(ref string errorMessage)
        {
            string errmsg;

            if (!TestInternal(out errmsg))
            {
                MySqlHelper.AskToImportDatabase(true);
            }

            var success = TestInternal(out errmsg);

            if (!success)
            {
                errorMessage = errmsg;
            }

            return(success);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// When overridden in the derived class, runs the test.
        /// </summary>
        /// <param name="errorMessage">When the method returns false, contains an error message as to why
        /// the test failed. Otherwise, contains an empty string.</param>
        /// <returns>
        /// True if the test passed; false if the test failed.
        /// </returns>
        protected override bool RunTest(ref string errorMessage)
        {
            string errmsg;

            if (!TestInternal(out errmsg))
            {
                MySqlHelper.AskToImportDatabase(false);
            }

            var success = TestInternal(out errmsg);

            if (!success)
            {
                errorMessage = AppendErrorDetails(_failMessage, errmsg);
            }

            return(success);
        }