Exemplo n.º 1
0
 public Task Dotnet()
 {
     var scrubbed = Scrubbers.ScrubStackTrace(@"
         Elmah.TestException: This is a test exception that can be safely ignored.
             at Elmah.ErrorLogPageFactory.FindHandler(String name) in C:\ELMAH\src\Elmah\ErrorLogPageFactory.cs:line 126
             at Elmah.ErrorLogPageFactory.GetHandler(HttpContext context, String requestType, String url, String pathTranslated) in C:\ELMAH\src\Elmah\ErrorLogPageFactory.cs:line 66
             at System.Web.HttpApplication.MapHttpHandler(HttpContext context, String requestType, VirtualPath path, String pathTranslated, Boolean useAppConfig)
             at System.Web.HttpApplication.MapHandlerExecutionStep.Execute()
             at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)");
     return Verifier.Verify(scrubbed);
 }
Exemplo n.º 2
0
 public Task Mono()
 {
     var scrubbed = Scrubbers.ScrubStackTrace(@"
          System.Web.HttpException: The controller for path '/helloworld' was not found or does not implement IController.
             at System.Web.Mvc.DefaultControllerFactory.GetControllerInstance (System.Web.Routing.RequestContext requestContext, System.Type controllerType) [0x00000] in <filename unknown>:0
             at System.Web.Mvc.DefaultControllerFactory.CreateController (System.Web.Routing.RequestContext requestContext, System.String controllerName) [0x00000] in <filename unknown>:0
             at System.Web.Mvc.MvcHandler.ProcessRequestInit (System.Web.HttpContextBase httpContext, IController& controller, IControllerFactory& factory) [0x00000] in <filename unknown>:0
             at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContextBase httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
             at System.Web.Mvc.MvcHandler.BeginProcessRequest (System.Web.HttpContext httpContext, System.AsyncCallback callback, System.Object state) [0x00000] in <filename unknown>:0
             at System.Web.Mvc.MvcHandler.System.Web.IHttpAsyncHandler.BeginProcessRequest (System.Web.HttpContext context, System.AsyncCallback cb, System.Object extraData) [0x00000] in <filename unknown>:0
             at System.Web.HttpApplication+<Pipeline>c__Iterator3.MoveNext () [0x00000] in <filename unknown>:0");
     return Verifier.Verify(scrubbed);
 }
Exemplo n.º 3
0
    public static void Init()
    {
        VerifierSettings.MemberConverter <Breadcrumb, IReadOnlyDictionary <string, string> >(
            target => target.Data,
            (_, value) =>
        {
            var dictionary = new Dictionary <string, string>();
            foreach (var pair in value)
            {
                if (pair.Key == "stackTrace")
                {
                    dictionary[pair.Key] = Scrubbers.ScrubStackTrace(pair.Value, true);
                }
                else
                {
                    dictionary[pair.Key] = pair.Value.Replace('\\', '/');
                }
            }

            return(dictionary);
        });
    }