SendDebugMessage() public method

public SendDebugMessage ( string message ) : void
message string
return void
Ejemplo n.º 1
0
        protected void Debug(string method, string function)
        {
#if DEBUG
            var msg = string.Format("{0} {1} {2} is {3}", Name, adapterVersion, method, function);
            TestLog.SendDebugMessage(msg);
#endif
        }
Ejemplo n.º 2
0
        public void RunAssembly(IFrameworkHandle testLog)
        {
            try
            {
#if LAUNCHDEBUGGER
                System.Diagnostics.Debugger.Launch();
#endif
                if (TryLoadAssembly())
                {
                    var listener = new NUnitEventListener(testLog, TestConverter);

                    try
                    {
                        runner.Run(listener, NUnitFilter, true, LoggingThreshold.Off);
                    }
                    catch (NullReferenceException)
                    {
                        // this happens during the run when CancelRun is called.
                        logger.SendDebugMessage("Nullref caught");
                    }
                    finally
                    {
                        runner.Unload();
                    }
                }
                else
                {
                    logger.NUnitLoadError(assemblyName);
                }
            }
            catch (BadImageFormatException)
            {
                // we skip the native c++ binaries that we don't support.
                logger.AssemblyNotSupportedWarning(assemblyName);
            }
            catch (System.IO.FileNotFoundException ex)
            {
                // Probably from the GetExportedTypes in NUnit.core, attempting to find an assembly, not a problem if it is not NUnit here
                logger.DependentAssemblyNotFoundWarning(ex.FileName, assemblyName);
            }
            catch (Exception ex)
            {
                logger.SendErrorMessage("Exception thrown executing tests in " + assemblyName, ex);
            }
        }